Alerts messages

This commit is contained in:
Klaudia 2020-12-31 02:28:38 +01:00
parent ef8d375e5f
commit 9405c0c6d2
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
{% if messages %}
{% for message in messages %}
<div id="message" class="panel-title-sign mt-xl text-center">
<div class="alert alert-{{ message.tags }} " role="alert">
<button type="button" class="close" height="54" data-dismiss="alert"><span aria-hidden="true">&times;</span></button>
<strong>
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}
Error:
{% else %}
{{ message.tags|title }}
{% endif %}
</strong>
{{ message }}
</div>
</div>
{% endfor %}
{% endif %}

View File

@ -24,6 +24,7 @@
<body> <body>
{% include 'navbar.html' %} {% include 'navbar.html' %}
{% include 'alerts.html' %}
{% block content %} {% endblock %} {% block content %} {% endblock %}
<script src="{% static 'js/jquery-3.2.1.min.js' %} "></script> <script src="{% static 'js/jquery-3.2.1.min.js' %} "></script>
<script src="{% static 'js/popper.min.js' %} "></script> <script src="{% static 'js/popper.min.js' %} "></script>