{% 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 js %} {{ block.super }} {# JavaScript for prepopulated fields #} {% prepopulated_fields_js %} {% endblock %} {% block content %} {% block form_modal %} {% include 'sb_admin/partials/modal/modal.html' %} {% endblock %} {% 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 %} {% endif %} {% for tab, tab_content_object in tabular_context.context.items %}
{% for tab_content in tab_content_object.content %} {% if tab_content.type == 'fieldset' %} {% with tab_content.value as fieldset %} {% if DETAIL_STRUCTURE_RIGHT_CLASS not in fieldset.classes %} {% include "sb_admin/includes/fieldset.html" %} {% endif %} {% endwith %} {% endif %} {% if tab_content.type == 'inline' %} {% 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 %}

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

{% if not is_popup and has_view_permission %} {% url opts|admin_urlname:'changelist' as changelist_url %} {% trans 'Back' %} {% endif %} {% submit_row %}
{% endblock %} {% endblock %}