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

39 lines
807 B
HTML

{% load form_helpers %}
{% load i18n %}
{% if form.fieldsets %}
{# Render hidden fields #}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
{# Render grouped fields according to Form #}
{% for fieldset in form.fieldsets %}
{% render_fieldset form fieldset %}
{% endfor %}
{% if form.custom_fields %}
<div class="field-group mb-5">
<div class="row">
<h5 class="col-9 offset-3">{% trans "Custom Fields" %}</h5>
</div>
{% render_custom_fields form %}
</div>
{% endif %}
{% if form.comments %}
<div class="field-group mb-5">
{% render_field form.comments %}
</div>
{% endif %}
{% else %}
{# Render all fields in a single group #}
<div class="field-group mb-5">
{% render_form form %}
</div>
{% endif %}