{% extends "admin/change_list.html" %}
{% load i18n %}

{% block content %}
<div id="content-main">

    {% if request.POST %}
    <p class="errornote">{% trans "Please correct the errors below." %}</p>
    {{ settings_form.non_field_errors }}
    {% endif %}

    <form method="post" class="change-form" id="settings-form">
        {% csrf_token %}
        {% for field in settings_form %}
        {% ifchanged field.group %}
        {% if not forloop.first %}
</div>
{% endif %}
<div class="module">
    <h2>{% trans field.group %}</h2>
    {% endifchanged %}
    <p>
        {{ field.label_tag }}{{ field }}{{ field.errors }}
        <span class="help">{{ field.help_text }}</span>
    </p>
    {% if forloop.last %}
</div>
{% endif %}
{% endfor %}
<div class="submit-row">
    <input type="submit" class="default" value="{% trans " Save" %}" />
</div>
</form>

</div>
{% endblock %}
