{% set messages = app.session.flashbag.get('error') %}
{% if messages|length > 0 %}
    <div class="alert alert-danger">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        {% for flashMessage in messages %}
            <p>{{ flashMessage }}</p>
        {% endfor %}
    </div>
{% endif %}
{% set messages = app.session.flashbag.get('info') %}
{% if messages|length > 0 %}
    <div class="alert alert-info">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        {% for flashMessage in messages %}
            <p>{{ flashMessage }}</p>
        {% endfor %}
    </div>
{% endif %}
{% set messages = app.session.flashbag.get('success') %}
{% if messages|length > 0 %}
    <div class="alert alert-success">
        <a href="#" class="close" data-dismiss="alert">&times;</a>
        {% for flashMessage in messages %}
            <p>{{ flashMessage }}</p>
        {% endfor %}
    </div>
{% endif %}
