feat: info text and correct field type for service group 'VEG'
addresses #869bvch71
This commit is contained in:
@@ -328,23 +328,50 @@
|
||||
}
|
||||
}) }}
|
||||
|
||||
{{ macros.service_field(form, 'board', 'Verpflegung', {
|
||||
'attr': {
|
||||
'hx-trigger': htmx_change_trigger,
|
||||
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
|
||||
'hx-target': '#main-content', 'hx-swap': 'innerHTML'
|
||||
}
|
||||
}) }}
|
||||
|
||||
{# VEG field - only render when defined (hide completely when no VEG services available) #}
|
||||
{% if form.veg is defined %}
|
||||
{{ macros.service_field(form, 'veg', 'Verpflegungswunsch', {
|
||||
'attr': {
|
||||
'hx-trigger': htmx_change_trigger,
|
||||
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
|
||||
'hx-target': '#main-content', 'hx-swap': 'innerHTML'
|
||||
}
|
||||
}) }}
|
||||
{# Board and VEG fields combined in one fieldset #}
|
||||
{% if form.board is defined or form.veg is defined %}
|
||||
<div class="pb-4">
|
||||
<fieldset class="border border-primary-bg">
|
||||
<legend class="w-full bg-primary-bg p-2 font-semibold uppercase">Verpflegung</legend>
|
||||
{% if form.board is defined %}
|
||||
{{ form_widget(form.board, {
|
||||
'attr': {
|
||||
'hx-trigger': htmx_change_trigger,
|
||||
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
|
||||
'hx-target': '#main-content', 'hx-swap': 'innerHTML'
|
||||
}
|
||||
}) }}
|
||||
{% endif %}
|
||||
{% if form.veg is defined %}
|
||||
<div class="p-2 border-t border-primary-bg">
|
||||
{{ form_widget(form.veg, {
|
||||
'attr': {
|
||||
'hx-trigger': htmx_change_trigger,
|
||||
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
|
||||
'hx-target': '#main-content', 'hx-swap': 'innerHTML'
|
||||
}
|
||||
}) }}
|
||||
{{ form_errors(form.veg) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% if form.board is defined %}
|
||||
{{ form_errors(form.board) }}
|
||||
{% endif %}
|
||||
<div class="text-sm mt-2 px-2 flex items-start space-x-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 flex-shrink-0">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
|
||||
</svg>
|
||||
<span>Bitte teile uns eventuelle Unverträglichkeiten an <a href="mailto:{{ customer_service_email }}" class="text-primary-light hover:underline">{{ customer_service_email }}</a> (inkl. der Buchungsnummer) mit.</span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="pb-4">
|
||||
<fieldset class="border border-primary-bg">
|
||||
<legend class="w-full bg-primary-bg p-2 font-semibold uppercase">Verpflegung</legend>
|
||||
<div class="p-2 text-sm text-gray-500">Nicht wählbar</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% set htmxAttr = {
|
||||
|
||||
Reference in New Issue
Block a user