{% load i18n %}

{% if form.non_field_errors or form.save_error or form.form.errors and display_field_errors %}
    <div class="message is-danger" style="word-wrap: break-word;">
        <div class="message-body">
            {{ form.non_field_errors }}
            {% if form.save_error %}
                <p>{{ form.save_error }}</p>
                {% if form.save_error_id %}<span>{% translate 'Error ID' %}: {{ form.save_error_id }}</span>{% endif %}
            {% endif %}
            {% if display_field_errors and form.errors %}
                <ul style="list-style-type: disc" class="">
                    {% for field in form.form %}
                        {% if field.errors %}
                            <li>
                                {{ field.label }}
                                <ul style="list-style-type: circle" class="pl-2">
                                    {% for e in field.errors %}
                                        <li>{{ e }}</li>
                                    {% endfor %}
                                </ul>
                            </li>
                        {% endif %}
                    {% endfor %}
                </ul>
            {% endif %}
        </div>
    </div>
{% endif %}
