From b71f858fb18a7a09fbefab693c4185b61076caec Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Sat, 16 Jan 2021 17:19:11 +0100
Subject: [PATCH] ### 0.0.7 Release * Issue #8
 WhoServiceUpdate.update_db_short() * Issue #9 URL: /who/update/short * Issue
 #10 async who_update_short_task * Issue #11
 WhoServiceUpdate.__update_who_global_data_short() * Issue #12 better layout
 for flash messages

---
 templates/fragment_flashed_messages.html | 32 ++++++++++++++++++------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/templates/fragment_flashed_messages.html b/templates/fragment_flashed_messages.html
index cbebc094..2e9db1d4 100644
--- a/templates/fragment_flashed_messages.html
+++ b/templates/fragment_flashed_messages.html
@@ -1,10 +1,26 @@
 <div class="fragment-flash-messages">
-{% for message in get_flashed_messages() %}
-    <div class="alert alert-success" role="alert">
-        <span>{{ message }}</span>
-        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
-            <span aria-hidden="true">&times;</span>
-        </button>
-    </div>
-{% endfor %}
+{% with errors = get_flashed_messages(category_filter=["error"]) %}
+    {% if errors %}
+        {% for message in errors %}
+            <div class="alert alert-danger" role="alert">
+                <span>{{ message }}</span>
+                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+        {% endfor %}
+    {% endif %}
+{% endwith %}
+{% with messages = get_flashed_messages(category_filter=["message"]) %}
+    {% if messages %}
+        {% for message in messages %}
+            <div class="alert alert-success" role="alert">
+                <span>{{ message }}</span>
+                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                </button>
+            </div>
+        {% endfor %}
+    {% endif %}
+{% endwith %}
 </div>
\ No newline at end of file
-- 
GitLab