Fixed flash messages in admin pages

This commit is contained in:
Jan Böhmer 2026-03-04 23:24:29 +01:00 committed by Marc Kreidler
parent 20a3ed27ca
commit 0b21c2656c
2 changed files with 9 additions and 16 deletions

View file

@ -1,23 +1,19 @@
{% block flashes %} {% block flashes %}
{# Insert flashes #} {# Insert flashes #}
<turbo-stream action="replace" action="morph" target="toast-container"> <turbo-stream action="update" action="morph" target="toast-container">
<template> <template>
<div class="toast-container" id="toast-container"> {% for label, messages in app.flashes() %}
{% for label, messages in app.flashes() %} {% for message in messages %}
{% for message in messages %} {{ include('_toast.html.twig', {
{{ include('_toast.html.twig', { 'label': label,
'label': label, 'message': message
'message': message }) }}
}) }}
{% endfor %}
{% endfor %} {% endfor %}
</div> {% endfor %}
</template> </template>
</turbo-stream> </turbo-stream>
{% endblock %} {% endblock %}
{# Insert info about when the sidebar trees were updated last time, so the sidebar_tree_controller can decide if it needs to reload the tree #} {# Insert info about when the sidebar trees were updated last time, so the sidebar_tree_controller can decide if it needs to reload the tree #}
<span id="sidebar-last-time-updated" style="display: none;" data-last-update="{{ sidebar_tree_updater.lastTreeUpdate.format("Y-m-d\\TH:i:sP") }}"></span> <span id="sidebar-last-time-updated" style="display: none;" data-last-update="{{ sidebar_tree_updater.lastTreeUpdate.format("Y-m-d\\TH:i:sP") }}"></span>

View file

@ -195,10 +195,7 @@
{% endif %} {% endif %}
</div> </div>
</fieldset> </fieldset>
{# Include turbo control things, so we can still control page title and reloading #}
{% include "_turbo_control.html.twig" %}
</turbo-frame> </turbo-frame>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}