{% extends "admin/base_site.html" %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript">
jQuery(document).ready(function($) {
    // activate that the form can be submit via Ctrl-S (function defined in pylucid_js_tools.js)
    bind_form_keypress($("#edit_page_form"), auto_title="{% trans 'save with Ctrl-S, too.' %}");
});
</script>
{% endblock extrahead %}

{% block content %}
<form action="{{ form_url }}" method="post" id="edit_page_form" class="pylucid_form">
{% csrf_token %}
{% if not sites|length_is:"1" %}
    <p><small>(The new PluginPage will be create on site: '<strong>{{ current_site }}</strong>'.)</small></p>
{% endif %}

{% if has_errors %}
<fieldset><legend>{% trans 'Form errors:' %}</legend>
{% for form in all_forms %}
    {% include "admin/pylucid/includes/form_errorlist.html" %}
{% endfor %}
</fieldset>
{% endif %}

<fieldset><legend>PluginPage</legend>
    {% include "admin/pylucid/includes/buttons_save_abort.html" %}

    {% with pluginpage_form as form %}
        {% include "admin/pylucid/includes/pylucid_formset.html" %}
    {% endwith %}
</fieldset>

{% for form in pagemeta_formset %}
<fieldset><legend>{% trans 'Language' %}: <strong>{{ form.language.description }}</strong></legend>
    <h2 class="form_collapse">PageMeta</h2>
    {% include "admin/pylucid/includes/pylucid_formset.html" %}
</fieldset>
{% endfor %}

{% include "page_admin/includes/fieldsets_pagetree.html" %}

{% include "admin/pylucid/includes/buttons_save_abort.html" %}

</form>
{% endblock %}
