{% extends "sb_admin/sb_admin_base.html" %} {% load i18n admin_urls static admin_modify sb_admin_tags %} {% block js_init %} {{ block.super }} {{ media }} {% endblock %} {% block view_class %}change-form{% endblock %} {% block js %} {{ block.super }} {# JavaScript for prepopulated fields #} {% prepopulated_fields_js %} {% endblock %} {% block content %} {% get_tabular_context adminform inline_admin_formsets tabs_context as tabular_context %} {% block header %}
{% if not is_popup and has_view_permission %} {% url opts|admin_urlname:'changelist' as changelist_url %} {% endif %}

{% include 'sb_admin/includes/change_form_title.html' %}

{% if change and not is_popup %} {% endif %}
{% endblock %} {% block form %}
{% csrf_token %} {% if errors %}
{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
{{ adminform.form.non_field_errors }} {% endif %} {% if is_popup %}{% endif %} {% if to_field %}{% endif %} {% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} {% if not tabular_context.default_tabs and tabular_context.context.keys|length > 1 %} {% endif %} {% for tab, tab_content_object in tabular_context.context.items %}
{% for tab_content in tab_content_object.content %} {% if tab_content.type == 'fieldset' %} {% block tab_content_fieldset %} {% with tab_content.value as fieldset %} {% if DETAIL_STRUCTURE_RIGHT_CLASS not in fieldset.classes %} {% include "sb_admin/includes/fieldset.html" %} {% endif %} {% endwith %} {% endblock %} {% endif %} {% if tab_content.type == 'inline' %} {% block before_inline_tab %} {% endblock %} {% with tab_content.value as inline_admin_formset %} {% include inline_admin_formset.opts.template %} {% endwith %} {% endif %} {% endfor %}
{% spaceless %}
{% for tab_content in tab_content_object.content %} {% if tab_content.type == 'fieldset' %} {% with tab_content.value as fieldset %} {% if DETAIL_STRUCTURE_RIGHT_CLASS in fieldset.classes %} {% include "sb_admin/includes/fieldset.html" %} {% endif %} {% endwith %} {% endif %} {% endfor %}
{% endspaceless %}
{% endfor %} {% block admin_change_form_document_ready %} {% endblock %} {% if is_popup %} {# TODO: check sticky bar in popups #} {% endif %} {% block action_bar %}

{% include 'sb_admin/includes/change_form_title.html' %}

{% if previous_url or next_url %}
<{% if previous_url %}a href="{{ previous_url }}"{% else %}button type="button" disabled{% endif %} class="btn btn-small" title="{% trans 'Prev' %}">
{% blocktrans %}{{ current_index }} / {{ all_objects_count }}{% endblocktrans %}
<{% if next_url %}a href="{{ next_url }}"{% else %}button type="button" disabled{% endif %} class="btn btn-small" title="{% trans 'Next' %}">
{% endif %}
{% if not is_popup and has_view_permission %} {% url opts|admin_urlname:'changelist' as changelist_url %} {% trans 'Back' %} {% endif %} {% submit_row %}
{% endblock %}
{% endblock %} {% endblock %}