From 9b2e209b4f0f50769b7ea160811167cb7ff5eb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Fri, 24 Oct 2025 09:28:41 +0200 Subject: [PATCH] feat: group rentals and rental insurance fields visually addresses #869ay16cp --- templates/booking/_participant_form.html.twig | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/templates/booking/_participant_form.html.twig b/templates/booking/_participant_form.html.twig index 92d53f6..27e1eef 100644 --- a/templates/booking/_participant_form.html.twig +++ b/templates/booking/_participant_form.html.twig @@ -22,7 +22,9 @@ {% else %}
{{ label }} -
{{ undefinedLabel }}
+ {% if undefinedLabel %} +
{{ undefinedLabel }}
+ {% endif %}
{% endif %} {% endmacro %} @@ -162,22 +164,6 @@ } }) }} - {{ macros.service_field(form, 'rentals', 'Leihmaterial', { - 'attr': { - 'hx-trigger': 'change', - 'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})), - 'hx-target': '#main-content', 'hx-swap': 'innerHTML' - } - }, 'Bitte zuerst den Skipass auswählen') }} - - {{ macros.checkbox_field(form, 'rentalInsurance', 'Leihmaterial-Versicherung', { - 'attr': { - 'hx-trigger': 'change', - 'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})), - 'hx-target': '#main-content', 'hx-swap': 'innerHTML' - } - }, 'Nur bei Buchung von Leihmaterial') }} - {{ macros.service_field(form, 'board', 'Verpflegung', { 'attr': { 'hx-trigger': 'change', @@ -186,6 +172,24 @@ } }) }} +
+ {{ macros.service_field(form, 'rentals', 'Leihmaterial', { + 'attr': { + 'hx-trigger': 'change', + 'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})), + 'hx-target': '#main-content', 'hx-swap': 'innerHTML' + } + }, 'Bitte zuerst den Skipass auswählen') }} + + {{ macros.checkbox_field(form, 'rentalInsurance', null, { + 'attr': { + 'hx-trigger': 'change', + 'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})), + 'hx-target': '#main-content', 'hx-swap': 'innerHTML' + } + }, null) }} +
+
{# Insurance display for edit mode (read-only) #} {% if bookingDto.mode == constant('App\\Form\\Model\\BookingDto::MODE_EDIT') and form.vars.data.participant.insurance %}