Show flash messages on event list.
This commit is contained in:
parent
b835956ea9
commit
bc2c884589
3 changed files with 14 additions and 12 deletions
|
|
@ -16,18 +16,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% block nav %}{{ navbar() }}{% endblock %}
|
{% block nav %}{{ navbar() }}{% endblock %}
|
||||||
{% with messages = get_flashed_messages() %}
|
{% include "flash_messages.html" %}
|
||||||
{% if messages %}
|
|
||||||
<div class="container-fluid mt-2">
|
|
||||||
{% for message in messages %}
|
|
||||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
||||||
{{ message }}
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endwith %}
|
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
<script src="{{ url_for("static", filename="bootstrap5/js/bootstrap.bundle.min.js") }}"></script>
|
<script src="{{ url_for("static", filename="bootstrap5/js/bootstrap.bundle.min.js") }}"></script>
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
{% from "navbar.html" import navbar with context %}
|
{% from "navbar.html" import navbar with context %}
|
||||||
<body>
|
<body>
|
||||||
{{ navbar() }}
|
{{ navbar() }}
|
||||||
|
{% include "flash_messages.html" %}
|
||||||
|
|
||||||
<div class="container-fluid mt-2">
|
<div class="container-fluid mt-2">
|
||||||
<h1>Agenda</h1>
|
<h1>Agenda</h1>
|
||||||
|
|
|
||||||
12
templates/flash_messages.html
Normal file
12
templates/flash_messages.html
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{% with messages = get_flashed_messages() %}
|
||||||
|
{% if messages %}
|
||||||
|
<div class="container-fluid mt-2">
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||||
|
{{ message }}
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue