{% extends modal_template_name %}
{% load crispy_forms_tags %}

{% block body %}
    {% if form.helper %}
        {% for hidden in form.hidden_fields %}
            {{ hidden }}
        {% endfor %}
        {% crispy form %}
    {% else %}
        {% if form.errors %}
            {% for error in form.non_field_errors %}
            <div class="p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 non-field-error" role="alert">
                {{ error|escape }}
            </div>
            {% endfor %}
        {% endif %}
        {{ form|crispy }}
    {% endif %}
{% endblock %}
