+
{% for message in messages %}
-
- {{ message }}
+ {{ message|raw }}
{% endfor %}
diff --git a/templates/booking/edit.html.twig b/templates/booking/edit.html.twig
index 9753cc9..c96acbe 100644
--- a/templates/booking/edit.html.twig
+++ b/templates/booking/edit.html.twig
@@ -4,8 +4,19 @@
{% include '_partials/_flashes.html.twig' %}
{{ form_start(form) }}
{% if not form.vars.valid %}
- {% set messages = form.vars.errors|map(error => error.message) %}
- {% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Die Buchung konnte nicht aktualisiert werden', 'messages': messages } %}
+ {% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Die Buchung konnte nicht aktualisiert werden' } %}
+ {% for child in form.participants.children %}
+ {% if not child.vars.valid %}
+ {% set participant = child.vars.data %}
+ {% set messages = [] %}
+ {% for field in child.children %}
+ {% for error in field.vars.errors %}
+ {% set messages = messages|merge([field.vars.label ~ ': ' ~ error.message]) %}
+ {% endfor %}
+ {% endfor %}
+ {% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Teilnehmer:in ' ~ participant.index ~ ':' ~ participant.firstName ~ participant.lastName, 'messages': messages } %}
+ {% endif %}
+ {% endfor %}
{% endif %}
{% for child in form.participants %}
-
- {% set participant = child.vars.data %}
+ {% set participant = child.vars.data %}
+
{% if participant.status == 'S' %}
{% do child.setRendered %}
{% endif %}
-
+
Teilnehmer:in {{ participant.index }}: {{ participant.firstName }} {{ participant.lastName }}
- {% if participant.status == 'S' %} storniert{% endif %}
+ {% if participant.status == 'S' %} storniert{% endif %}