11 lines
556 B
Twig
11 lines
556 B
Twig
{# Just the toast triggers. The container with id="flashes" lives in layout.html.twig, because
|
|
that is the element htmx swaps out of band after a booking. Each element is empty: the
|
|
toast_controller hands the message to Toastify, which renders it at the top right. #}
|
|
{% set levels = ['error', 'warning', 'success', 'info'] %}
|
|
|
|
{% for level, messages in app.flashes(levels) %}
|
|
{% for message in messages %}
|
|
<div {{ stimulus_controller('toast', { text: message|trans, class: 'toastify--' ~ level }) }}></div>
|
|
{% endfor %}
|
|
{% endfor %}
|