Files
netbox/netbox/utilities/templates/form_helpers/render_fieldset.html
2024-03-19 13:34:13 -04:00

27 lines
766 B
HTML

{% load i18n %}
{% load form_helpers %}
<div class="field-group mb-5">
{% if heading %}
<div class="row">
<h5 class="col-9 offset-3">{{ heading }}</h5>
</div>
{% endif %}
{% for layout, title, items in rows %}
{% if layout == 'field' %}
{# Single form field #}
{% render_field items.0 %}
{% elif layout == 'inline' %}
{# Multiple form fields on the same line #}
<div class="row mb-3">
<label class="col col-form-label text-lg-end">{{ title|default:'' }}</label>
{% for field in items %}
<div class="col mb-1">
{{ field }}
<div class="form-text">{% trans field.label %}</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>