{% if messages is defined %}
{% if messages.errors|length > 0 %}
<div class="alert alert-danger" role="alert">
<ul class="list list-unstyled">
{% for error in messages.errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if messages.infos|length > 0 %}
<div class="alert alert-primary" role="alert">
<ul class="list list-unstyled">
{% for message in messages.infos %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}