Statistics
| Branch: | Revision:

root / env / lib / python2.7 / site-packages / django / contrib / admin / templates / admin / includes / fieldset.html @ 1a305335

History | View | Annotate | Download (1.58 KB)

1
<fieldset class="module aligned {{ fieldset.classes }}">
2
    {% if fieldset.name %}<h2>{{ fieldset.name }}</h2>{% endif %}
3
    {% if fieldset.description %}
4
        <div class="description">{{ fieldset.description|safe }}</div>
5
    {% endif %}
6
    {% for line in fieldset %}
7
        <div class="form-row{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
8
            {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %}
9
            {% for field in line %}
10
                <div{% if not line.fields|length_is:'1' %} class="field-box{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}"{% endif %}>
11
                    {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}
12
                    {% if field.is_checkbox %}
13
                        {{ field.field }}{{ field.label_tag }}
14
                    {% else %}
15
                        {{ field.label_tag }}
16
                        {% if field.is_readonly %}
17
                            <p>{{ field.contents }}</p>
18
                        {% else %}
19
                            {{ field.field }}
20
                        {% endif %}
21
                    {% endif %}
22
                    {% if field.field.help_text %}
23
                        <p class="help">{{ field.field.help_text|safe }}</p>
24
                    {% endif %}
25
                </div>
26
            {% endfor %}
27
        </div>
28
    {% endfor %}
29
</fieldset>