{% extends 'layout_booking.html.twig' %} {% set htmx_change_trigger = 'change delay:300ms' %} {% 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) #}
{% include 'booking/_pagination.html.twig' with { current_step: 1, step_routes: stepRoutes } %}
{% block voucher_summary %}
{% include 'voucher/_summary.html.twig' %}
{% endblock %}
{% include '_partials/_flashes.html.twig' %} {# Pagination - desktop only (fixed above scrollable content) #} {# The preview button waits until the voucher fields would pass step 1's validation #}
{% set validatedFieldAttr = { 'data-field-validity-target': 'field' } %} {% from '_partials/_validation_errors.html.twig' import validation_alert %} {{ validation_alert(form, 'Bitte überprüfe deine Angaben', false) }} {# Any change takes the input over unvalidated and refreshes the summary #}

Motiv

{% for choice in form.template %} {% endfor %}
{% do form.template.setRendered %}
{{ form_errors(form.template) }}

Gutscheindaten

{{ form_row(form.from, { attr: form.from.vars.attr|merge(validatedFieldAttr) }) }} {{ form_row(form.to, { attr: form.to.vars.attr|merge(validatedFieldAttr) }) }} {{ form_row(form.amount, { attr: form.amount.vars.attr|merge(validatedFieldAttr), help: 'Ganze Euro-Beträge von %s € bis %s €'|format(voucher.minAmount|number_format(0, ',', '.'), voucher.maxAmount|number_format(0, ',', '.')) }) }}
{% include '_partials/_cancel_button.html.twig' with { cancel_url: path('app_voucher_cancel') } %}
{{ form_rest(form) }} {{ form_end(form) }} {% endblock %}