{% autoescape false %}

{# Legacy chamilo messages #}
{{ flash_messages }}

{# new flash messages when using controller #}
{% for type in sonata_flashmessages_types() %}
    {% set domain = domain is defined ? domain : null %}
    {% for message in sonata_flashmessages_get(type, domain) %}
        <div class="alert alert-{{ type|sonata_status_class }} alert-dismissable">
            <button
                    type="button"
                    class="close"
                    data-dismiss="alert"
                    aria-hidden="true"
                    aria-label="{{ 'message_close'|trans({}, 'SonataCoreBundle') }}"
            >&times;</button>
            {{ message|raw }}
        </div>
    {% endfor %}
{% endfor %}

{% endautoescape %}
