Skip to content

Commit

Permalink
moin-flash to buttons at bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
cintek committed Sep 12, 2024
1 parent 0b89365 commit 9218f16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/moin/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@
{% block item -%}
{# If you want itemviews in your template, extend from show.html, not from here. #}
<div id="moin-content">
<div id="moin-flash"> {# client side javascript may add messages here #}
{% for category, msg in get_flashed_messages(with_categories=true) %}
<p class="moin-flash moin-flash-{{ category }}">{{ msg }}</p>
{% endfor %}
</div>
{% block moin_flash %}
<div id="moin-flash"> {# client side javascript may add messages here #}
{% for category, msg in get_flashed_messages(with_categories=true) %}
<p class="moin-flash moin-flash-{{ category }}">{{ msg }}</p>
{% endfor %}
</div>
{% endblock %}
{% block content %}
{# All content templates should have implement this block. #}
{% endblock %}
Expand Down
11 changes: 11 additions & 0 deletions src/moin/templates/modify.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ <h1>{{ title }}</h1>
</div>
{% 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 #}
<div id="moin-flash"> {# client side javascript may add messages here #}
{% for category, msg in get_flashed_messages(with_categories=true) %}
<p class="moin-flash moin-flash-{{ category }}">{{ msg }}</p>
{% endfor %}
</div>


{#
Workaround:
For *Draw content, hide submit button, since *Draw
Expand Down

0 comments on commit 9218f16

Please sign in to comment.