{% for type,flash_messages in app.session.flashBag.all %}
{% for message in flash_messages %}
<div class="alert alert-{{ type }} t-center {% if fixed is defined and fixed == 'true' %}fixed{% else %}animated {% if type == 'success' %}zoomIn{% else %}shake{% endif %}{% endif %} fs-14">
{% if type == 'success' %}
<i class="fa fa-check-circle-o mr-1" aria-hidden="true"></i>
{% elseif type == 'warning' %}
<i class="fa fa-info-circle mr-1" aria-hidden="true"></i>
{% elseif type == 'danger' %}
<i class="fa fa-exclamation-circle mr-1" aria-hidden="true"></i>
{% endif %}
{{ message|raw }}
</div>
{% endfor %}
{% endfor %}
{% if form is defined and form_errors(form) %}
<div class="alert alert-danger t-center animated shake fs-14">
<i class="fa fa-exclamation-circle mr-1" aria-hidden="true"></i>
{{ form_errors(form) }}
</div>
{% endif %}
{% if error is defined and error is not null%}
<div class="alert alert-danger t-center animated shake fs-14">
<i class="fa fa-exclamation-circle mr-1" aria-hidden="true"></i>
{% if error.message == "Bad credentials." %}
Wpisałeś błędny e-mail lub hasło. Spróbuj ponownie.
{% elseif error.message == "User account is disabled." %}
Twoje konto jest nieaktywne.
{% else %}
{{ error.message }}
{% endif %}
</div>
{% endif %}