<div id="flash-messages">
    {% for flashMessage in app.session.flashbag.get('success') %}
        <div class="alert alert-success">
            <button class="close" data-dismiss="alert">&times;</button>
            {{ flashMessage|trans|raw|nl2br }}
        </div>
    {% endfor %}

    {% for flashMessage in app.session.flashbag.get('error') %}
        <div class="alert alert-danger">
            <button class="close" data-dismiss="alert">&times;</button>
            {{ flashMessage|trans|raw|nl2br }}
        </div>
    {% endfor %}

    {% for flashMessage in app.session.flashbag.get('info') %}
        <div class="alert alert-info">
            <button class="close" data-dismiss="alert">&times;</button>
            {{ flashMessage|trans|raw|nl2br }}
        </div>
    {% endfor %}

    {% for flashMessage in app.session.flashbag.get('warning') %}
        <div class="alert alert-warning">
            <button class="close" data-dismiss="alert">&times;</button>
            {{ flashMessage|trans|raw|nl2br }}
        </div>
    {% endfor %}
</div>