File: betterform.html

package info (click to toggle)
python-crispy-bootstrap5 2024.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 664 kB
  • sloc: python: 1,949; sh: 6; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 668 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% for fieldset in form.fieldsets %}
    <fieldset class="fieldset-{{ forloop.counter }} {{ fieldset.classes }}">
        {% if fieldset.legend %}
            <legend>{{ fieldset.legend }}</legend>
        {% endif %}

        {% if fieldset.description %}
            <p class="description">{{ fieldset.description }}</p>
        {% endif %}

        {% for field in fieldset %}
            {% if field.is_hidden %}
                {{ field }}
            {% else %}
                {% include "bootstrap5/field.html" %}
            {% endif %}
        {% endfor %}
    {% if not forloop.last or not fieldset_open %}
        </fieldset>
    {% endif %}
{% endfor %}