{% extends "wagtailadmin/base.html" %}
{% load i18n %}

{% block titletag %}{{ view.get_meta_title }}{% endblock %}

{% block extra_css %}
    {% include "wagtailadmin/pages/_editor_css.html" %}
    {{ edit_handler.form.media.css }}

    {{ view.media.css }}
{% endblock %}

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

    {{ view.media.js }}
{% endblock %}

{% block content %}

    {% block header %}
        {% include "wagtailadmin/shared/header.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon tabbed=1 merged=1 %}
    {% endblock %}

    <form action="{% block form_action %}{{ view.create_url }}{% endblock %}"{% if is_multipart %} enctype="multipart/form-data"{% endif %} method="POST" novalidate>
        {% csrf_token %}

        {% block form %}{{ edit_handler.render_form_content }}{% endblock %}

        {% block footer %}
            <footer>
                <ul>
                    <li class="actions">
                        {% block form_actions %}
                            <div class="dropdown dropup dropdown-button match-width">
                                <button type="submit" class="button action-save button-longrunning" tabindex="3" data-clicked-text="{% trans 'Saving…' %}">
                                    <span class="icon icon-spinner"></span><em>{% trans 'Save' %}</em>
                                </button>
                            </div>
                        {% endblock %}
                    </li>
                </ul>
            </footer>
        {% endblock %}
    </form>
{% endblock %}
