From 9218f16827efccee5b3edc8e0573e3d1af3bb417 Mon Sep 17 00:00:00 2001 From: Christoph Klassen Date: Mon, 25 Sep 2023 21:32:46 +0200 Subject: [PATCH] moin-flash to buttons at bottom --- src/moin/templates/layout.html | 12 +++++++----- src/moin/templates/modify.html | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/moin/templates/layout.html b/src/moin/templates/layout.html index c33d39501..adfd96e07 100644 --- a/src/moin/templates/layout.html +++ b/src/moin/templates/layout.html @@ -56,11 +56,13 @@ {% block item -%} {# If you want itemviews in your template, extend from show.html, not from here. #}
-
{# client side javascript may add messages here #} - {% for category, msg in get_flashed_messages(with_categories=true) %} -

{{ msg }}

- {% endfor %} -
+ {% block moin_flash %} +
{# client side javascript may add messages here #} + {% for category, msg in get_flashed_messages(with_categories=true) %} +

{{ msg }}

+ {% endfor %} +
+ {% endblock %} {% block content %} {# All content templates should have implement this block. #} {% endblock %} diff --git a/src/moin/templates/modify.html b/src/moin/templates/modify.html index 77114afb2..7a6dac8a9 100644 --- a/src/moin/templates/modify.html +++ b/src/moin/templates/modify.html @@ -81,6 +81,17 @@

{{ title }}

{% endif %} + {% block moin_flash %} + {% endblock %} + + {# id -> moin-flash is used to add special alerts for ex. for changes to User Settings via JS, see common.js #} +
{# client side javascript may add messages here #} + {% for category, msg in get_flashed_messages(with_categories=true) %} +

{{ msg }}

+ {% endfor %} +
+ + {# Workaround: For *Draw content, hide submit button, since *Draw