{% extends "admin/base_site.html" %}
{% load admin_list static i18n %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static 'admin/css/changelists.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'admin/css/forms.css' %}">
    {{ media.css }}
    <link rel="stylesheet" type="text/css" href="{% static 'admin/css/constance.css' %}">
{% endblock %}

{% block extrahead %}
    {% url 'admin:jsi18n' as jsi18nurl %}
    <script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script>
    {{ block.super }}
    {{ media.js }}
    <script type="text/javascript" src="{% static 'admin/js/constance.js' %}"></script>
    {% if django_version < "5.1" %}
        <script type="text/javascript" src="{% static 'admin/js/collapse.js' %}"></script>
    {% endif %}
{% endblock %}

{% block bodyclass %}{{ block.super }} change-list{% endblock %}

{% block content %}
    <div id="content-main" class="constance">
        <div class="module" id="changelist">
            <form id="changelist-form" action="" method="post" enctype="multipart/form-data">{% csrf_token %}
                {% if form.non_field_errors %}
                    <ul class="errorlist">
                        {% for error in form.non_field_errors %}
                            <li>{{ error }}</li>
                        {% endfor %}
                    </ul>
                {% endif %}
                {% if form.errors %}
                    <ul class="errorlist">
                {% endif %}
                {% for field in form.hidden_fields %}
                    {% for error in field.errors %}
                        <li>{{ error }}</li>
                    {% endfor %}
                    {{ field }}
                {% endfor %}
                {% if form.errors %}
                    </ul>
                {% endif %}

                <fieldset class="module">
                        <h2>{% trans "configuration" %}</h2>
                        {% include "admin/constance/includes/results_list.html" %}
                </fieldset>

                <p class="paginator sticky-footer">
                    <input type="submit" name="_save" class="default" value="{% trans 'save' %}">
                </p>
            </form>
        </div>
    </div>
{% endblock %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">{% trans 'home' %}</a>
        &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
        &rsaquo; {{ opts.verbose_name_plural|capfirst }}
    </div>
{% endblock %}
