{% load i18n cms_tags sekizai_tags %}

<form method="post" action="." id="{{ instance.id }}"
      {% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
      class="form {% if instance.custom_classes %}{{ instance.custom_classes }}{% endif %}
      {% if not form_success_url %}reveal_self reveal reveal_animation{% endif %}">

    {% if form.non_field_errors %}
        {% for error in form.non_field_errors %}
            <p class="form__errors">{{ error }}</p>
        {% endfor %}
    {% endif %}

    {% if form_success_url %}
        <p class="section__text form__success">
            {% if instance.success_message %}
                {{ instance.success_message }}
            {% else %}
                {% trans 'Ihre Angaben wurden erfolgreich übermittelt. Vielen Dank!' %}
            {% endif %}
        </p>
    {% endif %}

    {% if not form_success_url %}
        {% for plugin in instance.child_plugin_instances %}
            {% render_plugin plugin %}
        {% endfor %}
    {% endif %}

    {% csrf_token %}
    {% for field in form.hidden_fields %}
        {{ field }}
    {% endfor %}
</form>