fix: validation error indication on cards
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user