{% extends 'layout.html.twig' %} {# Local form theme override for consistent fieldset rendering #} {% use 'forms.html.twig' %} {% block form_row %} {%- if form.vars.expanded is defined and form.vars.expanded -%} {# Expanded forms get fieldset wrapper #}
{{- form.vars.label -}} {{- form_widget(form, { 'attr': attr|default({}) }) -}} {{- form_errors(form) -}} {{- form_help(form) -}}
{%- else -%} {{- parent() -}} {%- endif -%} {% endblock %} {% import _self as macros %} {# Macro to render a field or placeholder with consistent fieldset structure #} {% macro service_field(participant, fieldName, label, options = {}, undefinedLabel = 'Nicht wählbar') %} {% if participant[fieldName] is defined %} {{ form_row(participant[fieldName], options) }} {% else %}
{{ label }}
{{ undefinedLabel }}
{% endif %} {% endmacro %} {# Specialized macro for checkbox fields (like rental insurance) that need manual fieldset wrapping #} {% macro checkbox_field(participant, fieldName, label, options = {}, undefinedLabel = 'Nicht wählbar') %} {% if participant[fieldName] is defined %}
{{ label }} {{ form_row(participant[fieldName], options) }}
{% else %}
{{ label }}
{{ undefinedLabel }}
{% endif %} {% endmacro %} {% block content %} {% include '_partials/_flashes.html.twig' %}
{# Header with reload button #}

Buchung bearbeiten

{# Grid layout with 2/3 form + 1/3 summary #}

Teilnehmer

{{ form_start(form) }} {% do form.participants.setRendered %} {# This block contains the participant form fields #} {% block participants_form %}
{% for participant in form.participants %} {% set participantDataValid = participant.vars.valid %} {% set participantData = participant.vars.data %} {% set hasDateOfBirth = participantData and participantData.dateOfBirth %} {% set isEligible = hasDateOfBirth and is_participant_eligible(bookingEditDto, loop.index0) %} {% set isCanceled = participantData.status == 'S' %}
{{ loop.index == 1 ? 'Anmelder:in' : 'Teilnehmer:in ' ~ loop.index }} {% if isCanceled %} storniert {% endif %} {% if isEligible and not isCanceled and participantPrices is defined and participantPrices[loop.index0] is defined and participantPrices[loop.index0] > 0.0 %} €{{ participantPrices[loop.index0]|number_format(2, ',', '.') }} {% endif %}
{% endfor %}
{% endblock %}
Zurück
{{ form_rest(form) }} {{ form_end(form) }}
{% block booking_summary %}
{% include 'booking/_summary.html.twig' with { 'bookingCreateDto': bookingEditDto, 'participantCount': participantCount, 'groupedSelectedRooms': groupedSelectedRooms, 'assignmentCounts': assignmentCounts, 'mutableData': mutableData|default(null) } %}
{% endblock %}
{% endblock %}