MonScoDocEssai/app/templates/flashed_messages.j2

19 lines
530 B
Plaintext
Raw Normal View History

{# Messages flask (flash) #}
<div class="container flashes">
2022-02-28 15:18:21 +01:00
{% with messages = get_flashed_messages(with_categories=true) %}
{% for category, message in messages %}
<div class="alert alert-info alert-{{ category }}" role="alert">{{ message }}</div>
2022-02-28 15:18:21 +01:00
{% endfor %}
{% endwith %}
</div>
<script>
setTimeout(function() {
var flashes = document.getElementsByClassName("flashes")[0];
if (flashes) {
flashes.style.display = "none";
}
}, 5000);
</script>