{% extends 'admin/change_form.html' %}
{% load suit_forms %}

{% block form_top %}
    <div class="row edit-row">
    <div class="col-left">
    {% block suit_form_tabs %}
        {% block breadcrumbs %}
            {{ block.super }}
        {% endblock %}
        {% if adminform.model_admin.suit_form_tabs %}

            <ul id="suit_form_tabs" class="nav nav-tabs nav-tabs-suit" data-tab-prefix="suit-tab">
                {% for tab in adminform.model_admin.suit_form_tabs %}
                    <li class="nav-item">
                        <a href="#{{ tab.0 }}" id="suit_form_tab_{{ tab.0 }}" class="nav-link">{{ tab.1 }}</a>
                    </li>
                {% endfor %}
            </ul>

        {% endif %}
    {% endblock %}

    {{ block.super }}

{% endblock %}

{% block field_sets %}
    {# render suit_form_includes at top position #}
    {% include 'suit/change_form_includes.html' with position='top' %}

    {{ block.super }}

{% endblock %}

{% block inline_field_sets %}
{#    {% suit_form_conf 'form_inlines_hide_original' as suit_form_inlines_hide_original %}#}
{#    {{ suit_form_inlines_hide_original }}#}
    {% for inline_admin_formset in inline_admin_formsets %}
        {% suit_form_conf 'form_inlines_hide_original' inline_admin_formset as suit_form_inlines_hide_original %}
        <div class="{{ inline_admin_formset.opts.suit_classes }} {% if suit_form_inlines_hide_original %} suit-inlines-hide-original{% endif %}">
            {% include inline_admin_formset.opts.template %}
        </div>
    {% endfor %}
{% endblock %}

{% block after_field_sets %}
    {# render suit_form_includes at middle position #}
    {% include 'suit/change_form_includes.html' with position='middle' %}

    {{ block.super }}

{% endblock %}

{% block after_related_objects %}
    {{ block.super }}

    {# render suit_form_includes at last position #}
    {% include 'suit/change_form_includes.html' with position='bottom' %}

    <!-- Close left column, and that empty div -->
    </div>
    </div>

    <!-- Start right column -->
    <div class="col-right">
{% endblock %}


{% block admin_change_form_document_ready %}

    {# Move object-tools inside rigth column #}
    {% block object-tools %}
        {{ block.super }}
    {% endblock %}

    <!-- Close right column and row -->
    </div>
{#    </div>#}
    {{ block.super }}
{% endblock %}
