{{define "beneficiary_journeys"}}
<div class="px-4 py-6 sm:px-6">
    <form action="/app/journeys/" method="GET">

        {{ $departureField := "departure" }}
        {{ $departureLabel := "Départ" }}
        {{ template "address_autocomplete" dict "FieldName" $departureField "FieldLabel" $departureLabel }}

        {{ $destinationField := "destination" }}
        {{ $destinationLabel := "Destination" }}
        {{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel }}
        

        <div class="py-4 grid grid-cols-2">
            <div class="lg:col-span-1">
                <label for="departuredate" class="block text-sm font-medium text-gray-700">Le</label>
                <div class="mt-1">
                    <input type="date" id="departuredate" name="departuredate" value="{{.ViewState.departuredate}}"
                        class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
                </div>
            </div>
            <div class="lg:col-span-1">
                <label for="departuretime" class="block text-sm font-medium text-gray-700">A</label>
                <div class="mt-1">
                    <input type="time" id="departuretime" name="departuretime" value="{{.ViewState.departuretime}}"
                        class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
                </div>
            </div>
            
        </div>

        <button type="submit"
            class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
            Chercher
        </button>
    </form>
</div>
{{end}}