{% if messages is not empty %}
    {% for message in messages %}
        {% if message.type == 'success' %}
            <div class="el success msg">
                {{ message.content }}
                <i class="fa fa-check-circle"></i>
            </div>
        {% elseif message.type == 'warning' %}
            <div class="el warning msg">
                {{ message.content }}
                <i class="fa fa-exclamation-triangle"></i>
            </div>
        {% elseif message.type == 'error' %}
            <div class="el error msg">
                {{ message.content }}
                <i class="fa fa-exclamation-triangle"></i>
            </div>
        {% endif %}
    {% endfor %}
{% endif %}

{% if errors is not empty %}
    <div class="el error msg">
        {% for error in errors %}
            {{ error[0] }}<br>
            <i class="fa fa-exclamation-triangle"></i>
        {% endfor %}
    </div>
{% endif %}

{% if error is not empty %}
    <div class="el error msg">
        {{ error }}<br>
        <i class="fa fa-exclamation-triangle"></i>
    </div>
{% endif %}

{% if success is not empty %}
    <div class="el success msg">
        {{ success }}<br>
        <i class="fa fa-check-circle"></i>
    </div>
{% endif %}