{% load i18n %}
{% if form.non_field_errors or form.errors %}
    <div class="alert alert-danger form-errors" role="alert">
        <div>
            {% if form.non_field_errors %}
                {% if form.non_field_errors|length > 1 %}
                    <ul>
                        {% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %}
                    </ul>
                {% else %}
                    {{ form.non_field_errors.0 }}
                {% endif %}
            {% else %}
                {% translate "Please review and correct the errors highlighted in the form below." %}
            {% endif %}
        </div>
    </div>
{% endif %}
