{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans trimmed with title=page.specific_deferred.get_admin_display_title %}Copy {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
    {% trans "Copy" as copy_str %}
    {% include "wagtailadmin/shared/header.html" with title=copy_str subtitle=page.specific_deferred.get_admin_display_title icon="doc-empty-inverse" %}

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

            <ul class="fields">
                <li>
                    {% include "wagtailadmin/shared/field.html" with field=form.new_title %}
                </li>
                <li>
                    {% include "wagtailadmin/shared/field.html" with field=form.new_slug %}
                </li>
                <li>
                    {% include "wagtailadmin/shared/field.html" with field=form.new_parent_page %}
                </li>

                {% if form.copy_subpages %}
                    <li>
                        {% include "wagtailadmin/shared/field.html" with field=form.copy_subpages %}
                    </li>
                {% endif %}

                {% if form.publish_copies %}
                    <li>
                        {% include "wagtailadmin/shared/field.html" with field=form.publish_copies %}
                    </li>
                {% endif %}

                {% if form.alias %}
                    <li>
                        {% include "wagtailadmin/shared/field.html" with field=form.alias %}
                    </li>
                {% endif %}
            </ul>

            <input type="submit" value="{% trans 'Copy this page' %}" class="button">
        </form>
    </div>
{% endblock %}

{% block extra_js %}
    {{ block.super }}
    {% include "wagtailadmin/pages/_editor_js.html" %}
    {{ form.media.js }}
{% endblock %}

{% block extra_css %}
    {{ block.super }}
    {{ form.media.css }}
{% endblock %}
