{% extends "admin/base_site.html" %}
{% load i18n static %}
{% load url from future %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% get_static_prefix %}admin/css/forms.css" />{% endblock %}

{% block coltype %}colMS{% endblock %}
{% block bodyclass %}dbsettings{% endblock %}
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
    <a href="{% url 'admin:index' %}">{% trans "Home" %}</a> &rsaquo;
    {% trans "Edit Settings" %}
</div>
{% endif %}{% endblock %}

{% block content %}
<div id="content-main">
{% if form.errors %}
    <p class="errornote">
    {% blocktrans count form.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
{% endif %}
{% if form.fields %}
{% regroup form by class_name as classes %}
<form enctype="multipart/form-data" method="post">
    {% for class in classes %}
        <div class="module">
        <table summary="{% filter capfirst %}{% blocktrans with class.grouper as name %}Settings included in the {{ name }} class.{% endblocktrans %}{% endfilter %}" width="100%">
            <caption>{% filter capfirst %}{% if class.grouper %}{{ class.grouper }}{% else %}{% trans "Application settings" %}{% endif %}{% endfilter %}</caption>
            {% include "dbsettings/values.html" %}
            </table>
        </div>
    {% endfor %}
{% csrf_token %}<input type="submit" value="Save" class="default" />
</form>
{% else %}
    <p>{% trans "You don't have permission to edit values." %}</p>
{% endif %}
</div>
{% endblock %}
