Files
myep/templates/groups/booking/step_3.html.twig
T

109 lines
4.1 KiB
Twig

{% extends 'layout_booking.html.twig' %}
{% block title %}Schritt 3: Persönliche Daten{% endblock %}
{% block background %}bg-outer bg-outer--summer{% endblock %}
{% block content %}
{% form_theme form 'booking/_form_theme.html.twig' %}
{{ form_start(form, {
'attr': {
'class': 'flex-1 flex flex-col min-h-0',
'novalidate': 'novalidate',
}
}) }}
{# Pagination - mobile only (above summary) #}
<div class="lg:hidden">
{% include 'groups/booking/_pagination.html.twig' with { 'current_step': 3 } %}
</div>
<div class="flex-1 flex flex-col lg:grid lg:grid-cols-5 min-h-0 relative">
{# Static sidebar recap #}
<div class="order-1 lg:order-2 lg:flex-1 lg:min-h-0 lg:col-span-2"
{{ stimulus_controller('toggle', { 'open': false }, { 'closed': 'hidden', 'open': 'absolute inset-0 z-20', 'iconOpen': 'rotate-180' }) }}>
{% include 'groups/booking/_summary.html.twig' with { 'dto': dto, 'ctx': ctx } %}
</div>
{# Personal data form #}
<div class="flex-1 order-2 lg:order-1 lg:col-span-3 bg-white flex flex-col min-h-0">
{% include '_partials/_flashes.html.twig' %}
{# Pagination - desktop only (fixed above scrollable content) #}
<div class="hidden lg:block shrink-0">
{% include 'groups/booking/_pagination.html.twig' with { 'current_step': 3 } %}
</div>
<div id="booking-form" class="flex-1 overflow-y-auto px-4 lg:px-8 py-8">
<h2 class="pb-4">
Persönliche Daten
</h2>
{# Validation errors #}
{% from '_partials/_validation_errors.html.twig' import validation_alert %}
{{ validation_alert(form, 'Bitte fülle alle Pflichtfelder aus.') }}
{% if dto.isInquiry %}
{% include '_partials/_alert.html.twig' with {
level: 'warning',
title: 'Diese Buchung wird als unverbindliche Anfrage behandelt',
messages: dto.inquiryReasons
} %}
{% endif %}
<div class="grid lg:grid-cols-2 lg:gap-x-8">
{{ form_row(form.groupName) }}
{{ form_row(form.salutation) }}
</div>
<div class="grid lg:grid-cols-2 lg:gap-x-8">
{{ form_row(form.firstName) }}
{{ form_row(form.lastName) }}
</div>
<div class="grid lg:grid-cols-2 lg:gap-x-8">
{{ form_row(form.email) }}
{{ form_row(form.phone) }}
</div>
<h3 class="pt-4 pb-2">Adresse</h3>
{{ form_row(form.street) }}
<div class="grid lg:grid-cols-2 lg:gap-x-8">
{{ form_row(form.zip) }}
{{ form_row(form.city) }}
</div>
<h3 class="pt-4 pb-2">Anmerkungen</h3>
{{ form_row(form.remarks) }}
<div class="pt-6">
{% if form.forceInquiry is defined %}
{{ form_row(form.forceInquiry) }}
{% endif %}
</div>
</div>
</div>
</div>
<div class="shrink-0 bg-primary-dark px-4 lg:px-8 py-2 lg:py-4 z-20">
<div class="flex items-center justify-between">
<a href="{{ path('app_groups_booking_step_2') }}" class="button button--secondary">
Zurück
</a>
<div class="space-x-2">
<button type="submit" class="button button--primary">
weiter zu Schritt 4
</button>
</div>
</div>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}