{% extends "admin/base_site.html" %}
{% load i18n admin_modify %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="../../../jsi18n/"></script>
{{ media }}
{% endblock %}

{% block stylesheet %}css/forms.css{% endblock %}

{% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}

{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}

{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
     {% trans "Home" %} &rsaquo;
     Pagetree &rsaquo;
     Site Hierarchy &rsaquo;
      
     {% for section in parent.get_ancestors %}
        {{section.label}}
        {% ifnotequal section.label parent.label %}
           &rsaquo;
        {% endifnotequal %}
     {% endfor %}
</div>
{% endif %}{% endblock %}

{% block content %}

<div id="content-main">

	{% if errors %}
	    <p class="errornote">
	    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
	    </p>
	    <ul class="errorlist">{% for error in adminform.form.non_field_errors %}<li>{{ error }}</li>{% endfor %}</ul>
	{% endif %}

   <form action="{% url 'add-childsection' parent.id %}" method="post">
	
	   <fieldset class="module aligned">
			<table>
			{{ parent.add_child_section_form.as_table }}
			</table>
			<br />
		</fieldset>
		
		<div class="submit-row">
         <input value="Save" class="default" name="_save" type="submit">
      </div>
   </form>
</div>

{% endblock %}
