Files
myep/templates/voucher/step_2.html.twig
T
2026-10-01 15:03:27 +02:00

80 lines
3.7 KiB
Twig

{% extends 'layout_booking.html.twig' %}
{% block title %}Gutschein kaufen{% endblock %}
{% block content %}
{{ 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 'booking/_pagination.html.twig' with { current_step: 2, step_routes: stepRoutes } %}
</div>
<div class="flex-1 flex flex-col lg:grid lg:grid-cols-5 min-h-0 relative">
<div id="voucher-summary"
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 'voucher/_summary.html.twig' %}
</div>
<div id="form-wrapper"
class="flex-1 order-2 lg:order-1 lg:col-span-3 bg-primary-bg 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 'booking/_pagination.html.twig' with { current_step: 2, step_routes: stepRoutes } %}
</div>
<div class="flex-1 overflow-y-auto scroll-stable px-4 lg:px-8 py-8">
{% from '_partials/_validation_errors.html.twig' import validation_alert %}
{{ validation_alert(form) }}
<h2 class="pb-4">
Käufer:in
</h2>
{{ form_row(form.salutation) }}
<div class="grid grid-cols-1 md:grid-cols-2 md:gap-x-4">
{{ form_row(form.title) }}
<div class="hidden md:block"></div>
{{ form_row(form.firstName) }}
{{ form_row(form.lastName) }}
<div class="md:col-span-2">{{ form_row(form.address.street) }}</div>
{{ form_row(form.address.postCode) }}
{{ form_row(form.address.city) }}
{{ form_row(form.address.country) }}
<div class="hidden md:block"></div>
{{ form_row(form.email) }}
<div class="hidden md:block"></div>
{{ form_row(form.phone) }}
{{ form_row(form.mobile) }}
</div>
<h2 class="pt-4 pb-4">
Zahlungsart
</h2>
<div class="border border-primary-bg bg-white p-4">
{{ voucher.paymentMethod.label ?? 'Überweisung' }}
</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 justify-between" hx-disinherit="*">
{% include '_partials/_cancel_button.html.twig' with { cancel_url: path('app_voucher_cancel') } %}
<div class="flex items-center gap-2">
<a href="{{ path('app_voucher_step_1') }}"
class="button button--secondary"
{{ qa_attribute('btn-back') }}>
Zurück
</a>
<button type="submit" class="button button--primary" {{ qa_attribute('btn-submit') }}>
Weiter zu Schritt 3
</button>
</div>
</div>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}