{% block alert %}

    {% stylesheets
        "@RasFlashAlertBundle/Resources/public/css/alerts.css"
        output = 'css/alert/alerts.css'
    %}
        <link rel="stylesheet" href="{{ asset_url }}" />
    {% endstylesheets %}

    {% for alert in flashAlerts %}
        <div class="alert alert-{{ alert.type }}">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            {{ alert.message | raw  }}
        </div>
    {% endfor %}

{% endblock %}

{% stylesheets
    "@RasFlashAlertBundle/Resources/public/css/alerts.css"
    output = 'css/alert/alerts.css'
%}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

<div id="ras-flash-alerts">
    {% for alert in flashAlerts %}
        <div class="alert alert-{{ alert.type }}">
            <button type="button" class="close">&times;</button>
            {{ alert.message | raw  }}
        </div>
    {% endfor %}
</div>

<script type="text/javascript">
    // Pure JavaScript implementation for flash alerts
    window.onload = function () {
        var elements = document.getElementById("ras-flash-alerts")
                .getElementsByTagName('button');

        for (var i in elements) {
            if ((" " + elements[i].className + " ").indexOf("close") > -1) {
                elements[i].onclick = function () {
                    this.parentNode.style.display = 'none';
                };
            }
        }
    }
</script>

Add pure JavaScript implementation for flash alerts
Add pure JavaScript implementation for flash alerts
