fix: validation error indication on cards

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent 89979d6ce4
commit 03ac430be4
6 changed files with 208 additions and 17 deletions
@@ -1,8 +1,7 @@
{# Compact participant card with name, room, price, and edit button #}
{% set isCanceled = isCanceled|default(false) %}
{% set hasErrors = hasErrors|default(false) %}
{% set isValid = true %}
{% set errorMessages = errorMessages|default([]) %}
{% set isCanceled = cardData.isCanceled is defined ? cardData.isCanceled : false %}
{% set isValid = cardData.isValid is defined ? cardData.isValid : true %}
{% set errorMessages = cardData.errorMessages|default([]) %}
{% set mode = mode|default('create') %}
<div id="participant-card-{{ index }}"
@@ -60,14 +60,7 @@
{# Contact information #}
<div class="grid grid-cols-2 gap-4">
{{ form_row(form.email, {
'attr': {
'hx-trigger': 'change',
'hx-post': path(refreshRouteName, refreshRouteParams|default({index: participantIndex})),
'hx-target': '#main-content',
'hx-swap': 'innerHTML'
}
}) }}
{{ form_row(form.email) }}
{{ form_row(form.mobile) }}
</div>
@@ -9,6 +9,8 @@
{% block participant_cards %}
<div id="main-content" class="col-span-2">
{{ form_start(form, {
'method': 'POST',
'action': path('app_booking_create_step_2'),
'attr': {
'hx-post': path('app_booking_create_step_2'),
'hx-target': '#main-content',