{% include 'booking/_pagination.html.twig' with { 'current_step': 2 } %}
Teilnehmer:innen
{# Display form-level validation errors #} {% set applicantErrors = applicantErrors|default([]) %} {% if form.vars.submitted and not form.vars.valid %} {% if applicantErrors is not empty %} {% include '_partials/_alert.html.twig' with { level: 'error', title: 'Bitte überprüfe die Angaben zur anmeldenden Person', messages: ['Die Angaben zur anmeldenden Person sind noch unvollständig oder fehlerhaft.'] } %} {% else %} {% include '_partials/_alert.html.twig' with { level: 'error', title: 'Bitte überprüfe die Teilnehmerdaten', messages: ['Einige Teilnehmer haben noch unvollständige oder fehlerhafte Angaben. Bitte bearbeite die markierten Teilnehmer.'] } %} {% endif %} {% endif %} {% set bookingDto = bookingCreateContext.bookingDto %} {# The choice is only offered where the travel date allows it. #} {% if bookingDto.travel.allowsNonTravellingApplicant %} {# No form_start here: this sits inside the step 2 form and nested form tags are invalid. htmx posts the inputs enclosed below, including the CSRF token, to the toggle route. #}
{{ form_row(applicantTravelsForm.applicantTravels) }}
{{ form_rest(applicantTravelsForm) }}
{% if not bookingDto.applicantTravels %}
{% include 'booking/create/_applicant_card.html.twig' with {
'applicant': bookingDto.applicant,
'isSubmitted': bookingCreateContext.isSubmitted,
'applicantErrors': applicantErrors
} %}
{% endif %}
{% endif %}
{% for cardData in bookingCreateContext.cardsData %}
{% include 'booking/_participant_card.html.twig' with {
'cardData': cardData,
'index': loop.index0,
'participantNumber': loop.index,
'mode': 'create',
'isSubmitted': bookingCreateContext.isSubmitted,
'hintLabel': loop.index0 == 0 and bookingCreateContext.familyInsuranceUpgradeAvailable
? 'Familienversicherung möglich - jetzt wechseln'
: null
} %}
{% endfor %}