From fa93b59a8c75a1afd280481ec00cc28a4344bbdf Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 25 Feb 2019 16:41:53 +0100 Subject: [PATCH] switch to toast notifications everywhere --- passbook/core/templates/login/base.html | 2 +- .../core/templates/login/with_sources.html | 2 +- passbook/core/templates/overview/base.html | 132 +++++++++--------- .../core/templates/partials/messages.html | 20 +-- 4 files changed, 78 insertions(+), 78 deletions(-) diff --git a/passbook/core/templates/login/base.html b/passbook/core/templates/login/base.html index 42ecaf5b4..cf9797e05 100644 --- a/passbook/core/templates/login/base.html +++ b/passbook/core/templates/login/base.html @@ -24,7 +24,7 @@ {% block body %}
- {% include 'partials/messages.html' with toast=True %} + {% include 'partials/messages.html' %}
diff --git a/passbook/core/templates/login/with_sources.html b/passbook/core/templates/login/with_sources.html index ba744b8cb..9c515f838 100644 --- a/passbook/core/templates/login/with_sources.html +++ b/passbook/core/templates/login/with_sources.html @@ -24,7 +24,7 @@ {% block body %}
- {% include 'partials/messages.html' with toast=True %} + {% include 'partials/messages.html' %}
-
- {% include 'partials/messages.html' %} -
- {% block content %} - {% endblock %} + {% block content %} + {% endblock %}
{% endblock %} {% block scripts %} {% endblock %} diff --git a/passbook/core/templates/partials/messages.html b/passbook/core/templates/partials/messages.html index 94b4644da..005611a30 100644 --- a/passbook/core/templates/partials/messages.html +++ b/passbook/core/templates/partials/messages.html @@ -1,19 +1,19 @@ {% if messages %} - {% for msg in messages %} -
+{% for msg in messages %} +
{% if msg.level_tag == 'danger' %} - + {% elif msg.level_tag == 'warning' %} - + {% elif msg.level_tag == 'success' %} - + {% elif msg.level_tag == 'info' %} - + {% endif %} - {{ msg.message|safe }} -
- {% endfor %} + {{ msg.message|safe }} +
+{% endfor %} {% endif %}