diff --git a/templates/booking/create_step_2.html.twig b/templates/booking/create_step_2.html.twig index a339998..6c1fa5b 100644 --- a/templates/booking/create_step_2.html.twig +++ b/templates/booking/create_step_2.html.twig @@ -24,19 +24,19 @@ {% import _self as macros %} {# Macro to render a field or placeholder with consistent fieldset structure #} -{% macro service_field(participant, fieldName, label, options = {}) %} +{% macro service_field(participant, fieldName, label, options = {}, undefinedLabel = 'Nicht wählbar') %} {% if participant[fieldName] is defined %} {{ form_row(participant[fieldName], options) }} {% else %}
{{ label }} -
Nicht wählbar
+
{{ undefinedLabel }}
{% endif %} {% endmacro %} {# Specialized macro for checkbox fields (like rental insurance) that need manual fieldset wrapping #} -{% macro checkbox_field(participant, fieldName, label, options = {}) %} +{% macro checkbox_field(participant, fieldName, label, options = {}, undefinedLabel = 'Nicht wählbar') %} {% if participant[fieldName] is defined %}
{{ label }} @@ -45,7 +45,7 @@ {% else %}
{{ label }} -
Nicht wählbar
+
{{ undefinedLabel }}
{% endif %} {% endmacro %} @@ -177,7 +177,7 @@ 'hx-post': path('app_booking_create_step_2_refresh'), 'hx-swap': 'none' } - }) }} + }, 'Bitte zuerst den Skipass auswählen') }} {{ _self.checkbox_field(participant, 'rentalInsurance', 'Leihmaterial-Versicherung', { 'attr': { @@ -185,7 +185,7 @@ 'hx-post': path('app_booking_create_step_2_refresh'), 'hx-swap': 'none' } - }) }} + }, 'Nur bei Buchung von Leihmaterial') }} {{ _self.service_field(participant, 'board', 'Verpflegung', { 'attr': {