Omit fieldset header if none

This commit is contained in:
jeremystretch 2022-09-09 11:31:28 -04:00
parent 5888038996
commit f055235ef1

View File

@ -59,9 +59,11 @@ Context:
{# Render grouped fields according to Form #} {# Render grouped fields according to Form #}
{% for group, fields in form.fieldsets %} {% for group, fields in form.fieldsets %}
<div class="field-group mb-5"> <div class="field-group mb-5">
{% if group %}
<div class="row mb-2"> <div class="row mb-2">
<h5 class="offset-sm-3">{{ group }}</h5> <h5 class="offset-sm-3">{{ group }}</h5>
</div> </div>
{% endif %}
{% for name in fields %} {% for name in fields %}
{% with field=form|getfield:name %} {% with field=form|getfield:name %}
{% if not field.field.widget.is_hidden %} {% if not field.field.widget.is_hidden %}