{% extends '::base.html.twig' %}

{% block body %}
    {% for key, message in app.session.getFlashBag() %}
    <div class="alert alert-{{ key }}">
        {{ message|trans({}, 'FOSUserBundle') }}
    </div>
    {% endfor %}

    <div class="row">
        <div class="col-xs-12">
            {% block fos_user_content %}
            {% endblock fos_user_content %}
        </div>
    </div>
{% endblock %}

{% extends '::base.html.twig' %}

{% block body %}
    {% if app.request.hasPreviousSession %}
        {% for type, messages in app.session.flashbag.all() %}
            {% for message in messages %}
                {% if type matches '/error|danger|failure/' %}
                    {% set alert_class = 'danger' %}
                {% elseif type matches '/success/' %}
                    {% set alert_class = 'success' %}
                {% else %}
                    {% set alert_class = 'info' %}
                {% endif %}

                <div class="alert alert-{{ alert_class }}">
                    {{ message|trans({}, 'FOSUserBundle') }}
                </div>
            {% endfor %}
        {% endfor %}
    {% endif %}

    <div class="row">
        <div class="col-xs-12">
            {% block fos_user_content %}
            {% endblock fos_user_content %}
        </div>
    </div>
{% endblock %}

Fix flash messages in FOSUserBundle layout override
Fix flash messages in FOSUserBundle layout override

Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
