{# this is essentially admin/includes/fieldset.html, with detection of hidden fields. #}
{# context structure: InlineFieldset -> Fieldline -> AdminField -> form field (BoundField instance) #}
{# The hidden field handling is made in advance of https://code.djangoproject.com/ticket/11277 getting merged to trunk #}
{% for line in fieldset %}{% for adminfield in line %}{% if adminfield.field.is_hidden %}
  {{ adminfield.field }}{# render all hidden fields top level, compacter and easier to debug #}
{% endif %}{% endfor %}{% endfor %}
<fieldset class="module aligned{{ fieldset.name|yesno:' with-legend, first' }} {{ fieldset.classes }}">
    {% if fieldset.name %}
    <h2 class="legend">{{ fieldset.name }}
        {% if fieldset.description %}
        <span class="description">{{ fieldset.description|safe }}</span>
        {% endif %}
    </h2>
    {% endif %}
    {% for line in fieldset %}
        {% block line %}{% include "admin/fluent_contents/fieldset_line.html" %}{% endblock %}
    {% endfor %}
</fieldset>
