Fix alert rendering

master
informatic 2017-10-14 00:42:54 +02:00
parent 1309cecb21
commit f45805f172
2 changed files with 9 additions and 7 deletions

View File

@ -24,12 +24,14 @@
{% with messages = get_flashed_messages(with_categories=true) %} {% with messages = get_flashed_messages(with_categories=true) %}
<!-- Categories: success (green), info (blue), warning (yellow), danger (red) --> <!-- Categories: success (green), info (blue), warning (yellow), danger (red) -->
{% if messages %} {% if messages %}
{% for category, message in messages %} <div class="container">
<div class="alert alert-{{ category }} alert-dismissible" role="alert"> {% for category, message in messages %}
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> {% set category = 'info' if category == 'message' else category %}
<!-- <strong>Title</strong> --> {{ message }} <div class="alert alert-{{ category }} alert-dismissible" role="alert">
</div> <!-- <strong>Title</strong> --> {{ message }}
{% endfor %} </div>
{% endfor %}
</div>
{% endif %} {% endif %}
{% endwith %} {% endwith %}

View File

@ -7,7 +7,7 @@
Hey, <b>{{ current_user.gecos }}</b>! Hey, <b>{{ current_user.gecos }}</b>!
<small class="pull-right"><a href="/logout" class="btn btn-default btn-sm">Logout</a></small> <small class="pull-right"><a href="/logout" class="btn btn-default btn-sm">Logout</a></small>
</h2> </h2>
<h3>Approved applications</h3> <h3>Authorized applications</h3>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>