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

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}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 module_name as modules %}
<form enctype="multipart/form-data" method="post">
	{% for module in modules %}
		<div class="module">
			<table summary="{% filter capfirst %}{% blocktrans with module.grouper as name %}Models available in the {{ name }} application.{% endblocktrans %}{% endfilter %}" width="100%">
			<caption>{% filter capfirst %}{{ module.grouper }}{% endfilter %}</caption>
			{% regroup module.list by class_name as classes %}
			{% for class in classes %}
				{% if class.grouper %}
					<tr class="alt">
						<th>{% filter capfirst %}{{ class.grouper }}{% endfilter %}</th>
						<th>&nbsp;</th>
					</tr>
				{% endif %}
				{% include "dbsettings/values.html" %}
			{% endfor %}
			</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 %}
