{% extends "admin/cms/page/plugin/change_form.html" %}
{% load static %}
{% block extrahead %}
    <link rel="stylesheet" href="{% static 'djangocms_frontend/css/base.css' %}"/>
    <script src="{% static 'djangocms_frontend/js/bundle.base.js' %}"></script>
    {{ block.super }}
{% endblock %}
{% block content_subtitle %}{% endblock %}
{% block field_sets %}
    <div class="djangocms-frontend
        {% block custom_class %}{% endblock %}" data-static="{% get_static_prefix %}">
        <ul class="djangocms-frontend nav nav-pills" role="tablist">
            {% for fieldset in adminform %}
                {% if forloop.counter == 1 or "collapse" in fieldset.classes %}
                    <li class="nav-item" role="presentation">
                        <a class="nav-link" href="#tab-{{ forloop.counter }}"
                           {% if forloop.counter == 1 and original %}title="{{ original.pk|safe }}"{% endif %}
                           data-bs-toggle="tab" id="lnk-{{ forloop.counter }}" type="button" role="tab"
                           data-bs-target="#tab-{{ forloop.counter }}">{{ fieldset.name|default:adminform.model_admin }}
                              {% if "attributes" in fieldset.classes and original.attributes %}
                                 <span class="indicator attributes"></span>
                              {% endif %}
                              <span class="indicator error"></span>
                        </a>
                    </li>
                {% endif %}
            {% endfor %}
            {% if original %}
                <div class="tab-pk">{{ original.pk|safe }}</div>
            {% endif %}
        </ul>
        <div class="djangocms-frontend tab-content">
            {% for fieldset in adminform %}
                {% if forloop.counter == 1 or "collapse" in fieldset.classes %}
                    {% if forloop.counter != 1 %}</div>{% endif %}
                    <div class="tab-pane fade" id="tab-{{ forloop.counter }}" role="tabpanel">
                {% endif %}
                {% include "djangocms_frontend/admin/includes/fieldset.html" %}
            {% endfor %}{# djlint:off #}</div>
        </div>
    </div>{# djlint:on #}
{% endblock %}
