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

125 lines
5.9 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',
'hx-disabled-elt': 'find button[type=submit]'
}
}) }}
{# Pagination - mobile only #}
<div class="lg:hidden">
{% include 'booking/_pagination.html.twig' with { current_step: 3, 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-white flex flex-col min-h-0">
{% include '_partials/_flashes.html.twig' %}
{# Pagination - desktop only #}
<div class="hidden lg:block shrink-0">
{% include 'booking/_pagination.html.twig' with { current_step: 3, step_routes: stepRoutes } %}
</div>
<div class="flex-1 overflow-y-auto scroll-stable px-4 lg:px-8 py-8">
<h2 class="pb-4">
Übersicht
</h2>
{% from '_partials/_validation_errors.html.twig' import validation_alert %}
{{ validation_alert(form, 'Bitte bestätige beide Punkte', false) }}
<div class="border border-primary-bg mb-4">
<div class="p-2 bg-primary-bg uppercase font-semibold">
Gutschein
</div>
<table class="w-full table-fixed">
<tr>
<td class="p-2 align-top w-32">Motiv</td>
<td class="p-2 align-top">{{ voucher.template.label ?? '' }}</td>
</tr>
<tr>
<td class="p-2 align-top w-32">Von</td>
<td class="p-2 align-top break-words">{{ voucher.from }}</td>
</tr>
<tr>
<td class="p-2 align-top w-32">Für</td>
<td class="p-2 align-top break-words">{{ voucher.to }}</td>
</tr>
</table>
</div>
<div class="border border-primary-bg mb-4">
<div class="p-2 bg-primary-bg uppercase font-semibold">
Käufer:in
</div>
<div class="p-2">
{{ voucher.salutation }} {{ voucher.title }} {{ voucher.buyerFullName }}<br>
{{ voucher.address.street }}<br>
{{ voucher.address.country }} - {{ voucher.address.postCode }} {{ voucher.address.city }}<br>
{{ voucher.email }}
</div>
</div>
<div class="border border-primary-bg mb-4">
<div class="p-2 bg-primary-bg uppercase font-semibold">
Zahlungsart
</div>
<div class="p-2">
{{ voucher.paymentMethod.label ?? 'Überweisung' }}
</div>
</div>
<div class="flex items-center justify-between pb-4">
<span class="block uppercase font-semibold">Gesamtpreis</span>
<span class="font-semibold">{{ voucher.amount|format_currency('EUR') }}</span>
</div>
{% if purchasable %}
<div class="border border-primary-bg">
<div class="p-2 bg-primary-bg uppercase font-semibold">
Bestätigung
</div>
<div class="p-4">
{{ form_row(form.termsAccepted, {
'label_attr': {'class': 'text-base font-semibold'}
}) }}
{{ form_row(form.purchaseConfirmed, {
'label_attr': {'class': 'text-base font-semibold'}
}) }}
</div>
</div>
{% else %}
{% do form.termsAccepted.setRendered %}
{% do form.purchaseConfirmed.setRendered %}
{% endif %}
</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_2') }}"
class="button button--secondary"
{{ qa_attribute('btn-back') }}>
Zurück
</a>
{% if purchasable %}
<button type="submit" class="button button--primary" {{ qa_attribute('btn-submit') }}>
Zahlungspflichtig kaufen
</button>
{% endif %}
</div>
</div>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
{% endblock %}