<div class="alert alert-{{ type }} alert-dismissible" role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>

    {% if title %}
        <h4>{{ title }}</h4>
    {% endif %}

    {% if content %}
        <p>{{ content }}</p>
    {% endif %}

    {% if list %}
        <ul>
        {% for item in list %}
            <li>{{ item }}</li>
        {% endfor %}
        </ul>
    {% endif %}
</div>

{% if jscript %}
    <script>
        {% if errors %}
            var errors = JSON.parse('{{ errors|raw }}');
        {% endif %}
        {{ jscript|raw }}
    </script>
{% endif %}