doughnut-wedding/app/Resources/views/flash_messages.html.twig

20 lines
842 B
Twig
Raw Permalink Normal View History

2017-02-10 21:34:31 -08:00
<div class="uk-width-1-1">
{% for messageType, messages in app.session.flashbag.all %}
{% if messageType == 'error' %}
{% set messageType = 'danger' %}
{% set displayType = 'error' %}
{% elseif messageType == 'info' %}
{% set messageType = 'primary' %}
{% set displayType = 'info' %}
{% else %}
{% set displayType = messageType %}
{% endif %}
<div class="uk-alert-{{ messageType }} uk-margin-small" uk-alert>
<a class="uk-alert-close uk-text-{{ messageType }}" uk-close></a>
<h3 class="uk-text-{{ messageType }}">{{ displayType|capitalize }}</h3>
{% for message in messages %}
<div class="uk-width-1-1">{{ message }}</div>
{% endfor %}
</div>
{% endfor %}
</div>