Fixed flash messages in admin pages

This commit is contained in:
Jan Böhmer 2026-03-04 23:24:29 +01:00
parent 2137eecddf
commit c549665578
2 changed files with 9 additions and 16 deletions

View file

@ -1,23 +1,19 @@
{% block flashes %}
{# Insert flashes #}
<turbo-stream action="replace" action="morph" target="toast-container">
<turbo-stream action="update" action="morph" target="toast-container">
<template>
<div class="toast-container" id="toast-container">
{% for label, messages in app.flashes() %}
{% for message in messages %}
{{ include('_toast.html.twig', {
'label': label,
'message': message
}) }}
{% endfor %}
{% for label, messages in app.flashes() %}
{% for message in messages %}
{{ include('_toast.html.twig', {
'label': label,
'message': message
}) }}
{% endfor %}
</div>
{% endfor %}
</template>
</turbo-stream>
{% 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 #}
<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 %}
</div>
</fieldset>
{# Include turbo control things, so we can still control page title and reloading #}
{% include "_turbo_control.html.twig" %}
</turbo-frame>
</div>
</div>
{% endblock %}
{% endblock %}