1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Introduce InlineFields for rendering fields side-by-side

This commit is contained in:
Jeremy Stretch
2024-03-12 15:44:35 -04:00
parent 93c9f8cc04
commit f585c36d86
7 changed files with 79 additions and 106 deletions

View File

@@ -9,21 +9,8 @@
{% endfor %}
{# Render grouped fields according to Form #}
{% for group, fields in form.fieldsets %}
<div class="field-group mb-5">
{% if group %}
<div class="row">
<h5 class="col-9 offset-3">{{ group }}</h5>
</div>
{% endif %}
{% for name in fields %}
{% with field=form|getfield:name %}
{% if field and not field.field.widget.is_hidden %}
{% render_field field %}
{% endif %}
{% endwith %}
{% endfor %}
</div>
{% for group, items in form.fieldsets %}
{% render_fieldset form items heading=group %}
{% endfor %}
{% if form.custom_fields %}