fix: applicant split in edit mode, drop create-mode agency checks

This commit is contained in:
fromme committed 2026-10-16 17:49:04 +02:00
1 parent ad6e42ab0c
commit 38f0f23ea3
12 files changed
+167 -68

No files matched your search

+18 -20
View File
@@ -54,27 +54,25 @@
{% endif %}
{% set bookingDto = bookingCreateContext.bookingDto %}
{% if not bookingDto.isInternalAgencyBooking() %}
{# 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. #}
<div class="mb-6 rounded border border-gray-200 bg-white p-4"
hx-post="{{ path('app_booking_create_step_2_applicant_toggle') }}"
hx-trigger="change"
hx-include="this"
{{ qa_attribute('applicant-travels') }}>
{{ form_row(applicantTravelsForm.applicantTravels) }}
{{ form_rest(applicantTravelsForm) }}
{# 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. #}
<div class="mb-6 rounded border border-gray-200 bg-white p-4"
hx-post="{{ path('app_booking_create_step_2_applicant_toggle') }}"
hx-trigger="change"
hx-include="this"
{{ qa_attribute('applicant-travels') }}>
{{ 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 %}
</div>
{% endif %}
{% if not bookingDto.applicantTravels %}
{% include 'booking/create/_applicant_card.html.twig' with {
'applicant': bookingDto.applicant,
'isSubmitted': bookingCreateContext.isSubmitted,
'applicantErrors': applicantErrors
} %}
{% endif %}
</div>
<div class="divide-y divide-gray-200">
{% for cardData in bookingCreateContext.cardsData %}