Commit eafe356f authored by Paul Brown's avatar Paul Brown

Merge pull request #926 from pawl/allow_success_flash

Allow flash message in success style
parents 15a47a55 a6815759
...@@ -70,12 +70,13 @@ ...@@ -70,12 +70,13 @@
{% if messages %} {% if messages %}
{% for category, m in messages %} {% for category, m in messages %}
{% if category %} {% if category %}
{# alert-error changed to alert-danger in bootstrap 3, mapping is for backwards compatibility #}
{% set mapping = {'message': 'info', 'error': 'danger'} %} {% set mapping = {'message': 'info', 'error': 'danger'} %}
<div class="alert alert-{{ mapping.get(category, 'warning') }} alert-dismissable"> <div class="alert alert-{{ mapping.get(category, category) }} alert-dismissable">
{% else %} {% else %}
<div class="alert alert-dismissable"> <div class="alert alert-dismissable">
{% endif %} {% endif %}
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ m }} {{ m }}
</div> </div>
{% endfor %} {% endfor %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment