@extends("admin.layout.base")
@extends("admin.layout.header")

@section("title")
    Kontakt - Rediger
@endsection

@section("path")
    <a href="{{ route('contacts.edit', ['contact' => $contact]) }}" class="text-white">Rediger Kontakt</a> /
@endsection

@section("content")
    <h1>Rediger Kontakt:</h1>
    <form method="post" action="{{ route("contacts.update", ['contact' => $contact]) }}">
        @csrf
        @method("put")
        <label for="contactname">Kontakt Navn:</label>
        <input type="text" name="contactname" id="contactname" placeholder="Navn" value="{{ $contact->contactname }}" required>
        <label for="title">Titel:</label>
        <input type="text" name="title" id="title" placeholder="Titel" value="{{ $contact->title }}" required>
        <label for="email">Email:</label>
        <input type="email" name="email" id="email" placeholder="x@y.z" value="{{ $contact->email }}" required>
        <label for="tel">Telefon nr:</label>
        <input type="tel" name="phone" id="tel" placeholder="12345678" value="{{ $contact->phone }}" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
        <input type="submit" class="btn btn-dark text-white" value="Opret">
    </form>
@endsection