{% extends "admin/base_site.html" %}
{% load i18n admin_modify adminmedia %}
{% load url from future %}

{% block extrahead %}{{ block.super }}
{% url 'admin:jsi18n' as jsi18nurl %}
<script type="text/javascript" src="{{ jsi18nurl|default:"../../../jsi18n/" }}"></script>
{{ media }}
{% endblock %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}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">
    {% for breadcrumb in breadcrumbs %}
    {% if breadcrumb.url %}
    <a href="{{breadcrumb.get_absolute_url}}">{{breadcrumb.name}}</a>
    {% else %}
    {{breadcrumb.name}}
    {% endif %}
    {% if not forloop.last %}&rsaquo;{% endif %}
    {% endfor %}
</div>
{% endif %}{% endblock %}

{% block content %}<div id="content-main">
{% block object-tools %}
{% if object_tools %}
  <ul class="object-tools">
  {% for object_tool in object_tools %}
  <li>{{object_tool}}</li>
  {% endfor %}
  {% comment %}
  <li><a href="history/" class="historylink">{% trans "History" %}</a></li>
  {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
  {% endcomment %}
  </ul>
{% endif %}
{% endblock %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if form.errors %}
    <p class="errornote">
    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
    {{ form.non_field_errors }}
{% endif %}

{% for fieldset in adminform %}
  {% include "admin/includes/fieldset.html" %}
{% endfor %}

{% block after_field_sets %}{% endblock %}

{% for inline_admin_formset in inline_admin_formsets %}
    {% include inline_admin_formset.opts.template %}
{% endfor %}

{% block after_related_objects %}{% endblock %}


{% block submitrow %}
{% if dotpath %}
<div class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}>

{% if show_save %}<input type="submit" value="{% trans 'Submit' %}" class="default" name="_save" {{ onclick_attrib }}/>{% endif %}
{% if show_save_as_new %}<input type="submit" value="{% trans 'Submit as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%}
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Submit and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %}
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Submit and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %}
{% if show_delete_link %}<input type="submit" value="{% trans 'Delete' %}" name="_delete" class="deletelink" {{ onclick_attrib }}/>{% endif %}
</div>
{% else %}
{% submit_row %}
{% endif %}
{% endblock %}
</div>
</form></div>
{% endblock %}
