{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}Create translation request{% endblock %}

{% block content %}
    {% include "wagtailadmin/shared/header.html" with title="Create translation request" subtitle=page.get_admin_display_title icon="doc-empty-inverse" %}

    <div class="nice-padding">
        <form action="{% url 'wagtail_localize_workflow:create_translation_request' page.id %}" method="POST">
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}">

            {% for field in form.hidden_fields %}{{ field }}{% endfor %}

            <ul class="fields">
                {% block visible_fields %}
                    {% for field in form.visible_fields %}
                        {% include "wagtailadmin/shared/field_as_li.html" %}
                    {% endfor %}
                {% endblock %}
                <li><input type="submit" value="{% trans 'Submit' %}" class="button" /> <a href="{% if next %}{{ next }}{% else %}{% url 'wagtailadmin_explore' page.get_parent.id %}{% endif %}" class="button button-secondary">{% trans "Go back" %}</a></li>
            </ul>
        </form>
    </div>
{% endblock %}
