{% extends "django_cradmin/viewhelpers/formview_base.django.html" %}
{% load crispy_forms_tags %}

{% block title %}
    {{ pagetitle }}
{% endblock title %}

{% block pageheader-inner %}
    <h1>
        {% block heading %}
            {{ pageheading }}
        {% endblock heading %}
    </h1>
{% endblock pageheader-inner %}

{% block outside-bodycontentwrapper %}
    {{ block.super }}
    {% block handle_preview %}
        {% if show_preview %}
            <div django-cradmin-page-preview-wrapper>
                {% include "django_cradmin/pagepreview/includes/pagepreview-fullsize-iframe-wrapper.django.html" %}
                <div django-cradmin-page-preview-open-on-page-load='{
                    "urls": [
                        {
                            "label": "unused",
                            "url": "{{ preview_url }}"
                        }
                    ]
                }'></div>
            </div>
        {% endif %}
    {% endblock handle_preview %}
{% endblock outside-bodycontentwrapper %}
