{% load wagtailadmin_tags i18n %}

{% include "wagtailadmin/shared/non_field_errors.html" %}

{% if data_variable %}
    <h2 style="margin-top: 40px;margin-bottom: 10px">
        {% blocktranslate trimmed with data_var=data_variable %}
            Data Variable : {{ data_var }}
        {% endblocktranslate %}
    </h2>
{% endif %}

<form action="{{ publish_action }}" method="POST" enctype="multipart/form-data" novalidate>
    <ul class="fields">
        {% csrf_token %}
        {% for field in form %}
            {% if field.is_hidden %}
                {{ field }}
            {% else %}
                {% include "wagtailadmin/shared/field_as_li.html" %}
            {% endif %}
        {% endfor %}
        <li>
            <button type="submit" class="button button-longrunning">
                {% icon name="spinner" %}
                {% translate 'Publish' %}
            </button>
            <a href="{{ delete_action }}" class="delete button no">
                {% translate "Delete" %}
            </a>
        </li>
    </ul>
</form>