diff --git a/netbox/project-static/dist/netbox-dark.css b/netbox/project-static/dist/netbox-dark.css index bea07d1cc..491c3d3a1 100644 Binary files a/netbox/project-static/dist/netbox-dark.css and b/netbox/project-static/dist/netbox-dark.css differ diff --git a/netbox/project-static/dist/netbox-light.css b/netbox/project-static/dist/netbox-light.css index 5915202ad..ef72ba9a6 100644 Binary files a/netbox/project-static/dist/netbox-light.css and b/netbox/project-static/dist/netbox-light.css differ diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index 058526cbb..fc7c00c0d 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -647,6 +647,11 @@ span.color-label { } } +.form-object-edit { + margin: 0 auto; + max-width: 800px; +} + textarea.form-control[rows='10'] { height: 18rem; } diff --git a/netbox/templates/dcim/device_component_edit.html b/netbox/templates/dcim/device_component_edit.html index 25980a090..2eb2fcd96 100644 --- a/netbox/templates/dcim/device_component_edit.html +++ b/netbox/templates/dcim/device_component_edit.html @@ -4,7 +4,7 @@ {% block form_fields %} {% if form.instance.device %}
- +
diff --git a/netbox/templates/dcim/interface_edit.html b/netbox/templates/dcim/interface_edit.html index 41ae1fe50..43f21b6e7 100644 --- a/netbox/templates/dcim/interface_edit.html +++ b/netbox/templates/dcim/interface_edit.html @@ -6,7 +6,7 @@

Interface

{% if form.instance.device %}
- +
diff --git a/netbox/templates/dcim/virtualchassis_edit.html b/netbox/templates/dcim/virtualchassis_edit.html index 79966ca44..645eb2931 100644 --- a/netbox/templates/dcim/virtualchassis_edit.html +++ b/netbox/templates/dcim/virtualchassis_edit.html @@ -5,100 +5,94 @@ {% block title %}{% if vc_form.instance %}Editing Virtual Chassis {{ vc_form.instance }}{% else %}New Virtual Chassis{% endif %}{% endblock %} {% block content %} -
+ {% csrf_token %} {{ pk_form.pk }} {{ formset.management_form }} -
-
-
-
Virtual Chassis
-
- {% render_field vc_form.name %} - {% render_field vc_form.domain %} - {% render_field vc_form.master %} - {% render_field vc_form.tags %} -
-
- {% if vc_form.custom_fields %} -
-
Custom Fields
-
- {% render_custom_fields vc_form %} -
-
- {% endif %} -
-
Members
-
- - - - - - - - - - - - - - {% for form in formset %} - {% for field in form.hidden_fields %} - {{ field }} - {% endfor %} - {% with device=form.instance virtual_chassis=vc_form.instance %} - - - - - - - - - - {% endwith %} - {% endfor %} - -
DeviceIDRack/UnitSerialPositionPriority
- {{ device }} - {{ device.pk }} - {% if device.rack %} - {{ device.rack }} / {{ device.position }} - {% else %} - - {% endif %} - {{ device.serial|placeholder }} - {{ form.vc_position }} - {% if form.vc_position.errors %} -
{{ form.vc_position.errors.0 }} - {% endif %} -
- {{ form.vc_priority }} - {% if form.vc_priority.errors %} -
{{ form.vc_priority.errors.0 }} - {% endif %} -
- {% if virtual_chassis.pk %} - - - - {% endif %} -
-
-
+
+
Virtual Chassis
+
+ {% render_field vc_form.name %} + {% render_field vc_form.domain %} + {% render_field vc_form.master %} + {% render_field vc_form.tags %}
-
-
- Cancel - {% if vc_form.instance.pk %} - - {% else %} - - {% endif %} + {% if vc_form.custom_fields %} +
+
Custom Fields
+
+ {% render_custom_fields vc_form %} +
+ {% endif %} +
+
Members
+
+ + + + + + + + + + + + + + {% for form in formset %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} + {% with device=form.instance virtual_chassis=vc_form.instance %} + + + + + + + + + + {% endwith %} + {% endfor %} + +
DeviceIDRack/UnitSerialPositionPriority
+ {{ device }} + {{ device.pk }} + {% if device.rack %} + {{ device.rack }} / {{ device.position }} + {% else %} + + {% endif %} + {{ device.serial|placeholder }} + {{ form.vc_position }} + {% if form.vc_position.errors %} +
{{ form.vc_position.errors.0 }} + {% endif %} +
+ {{ form.vc_priority }} + {% if form.vc_priority.errors %} +
{{ form.vc_priority.errors.0 }} + {% endif %} +
+ {% if virtual_chassis.pk %} + + + + {% endif %} +
+
+
+
+ Cancel + {% if vc_form.instance.pk %} + + {% else %} + + {% endif %}
{% endblock %} diff --git a/netbox/templates/generic/object_edit.html b/netbox/templates/generic/object_edit.html index 60fdb1032..fe0598b29 100644 --- a/netbox/templates/generic/object_edit.html +++ b/netbox/templates/generic/object_edit.html @@ -31,72 +31,66 @@ {% block content-wrapper %}
-
+ {% csrf_token %} - {% for field in form.hidden_fields %}{{ field }}{% endfor %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} -
-
- {% block form %} - {% if form.Meta.fieldsets %} + {% block form %} + {% if form.Meta.fieldsets %} - {# Render grouped fields according to Form #} - {% for group, fields in form.Meta.fieldsets %} -
-
{{ group }}
- {% for name in fields %} - {% render_field form|getfield:name %} - {% endfor %} -
+ {# Render grouped fields according to Form #} + {% for group, fields in form.Meta.fieldsets %} +
+
{{ group }}
+ {% for name in fields %} + {% render_field form|getfield:name %} {% endfor %} +
+ {% endfor %} - {% if form.custom_fields %} -
-
Custom Fields
- {% render_custom_fields form %} -
- {% endif %} + {% if form.custom_fields %} +
+
Custom Fields
+ {% render_custom_fields form %} +
+ {% endif %} - {% if form.comments %} -
- {% render_field form.comments label='Comments' %} -
- {% endif %} + {% if form.comments %} +
+ {% render_field form.comments label='Comments' %} +
+ {% endif %} - {% else %} - {# Render all fields in a single group #} -
-
{{ obj_type|capfirst }}
- {% block form_fields %}{% render_form form %}{% endblock %} -
- {% endif %} + {% else %} + {# Render all fields in a single group #} +
+
{{ obj_type|capfirst }}
+ {% block form_fields %}{% render_form form %}{% endblock %} +
+ {% endif %} - {% endblock form %} -
-
+ {% endblock form %} -
-
- {% block buttons %} - Cancel +
+ {% block buttons %} + Cancel - {% if obj.pk %} - + {% if obj.pk %} + + {% else %} + + + {% endif %} - {% else %} - - - - {% endif %} - - {% endblock buttons %} -
+ {% endblock buttons %}
diff --git a/netbox/templates/virtualization/vminterface_edit.html b/netbox/templates/virtualization/vminterface_edit.html index 45e7b0d6e..022325dc8 100644 --- a/netbox/templates/virtualization/vminterface_edit.html +++ b/netbox/templates/virtualization/vminterface_edit.html @@ -6,7 +6,7 @@
Interface
{% if form.instance.virtual_machine %}
- +
@@ -36,12 +36,12 @@ {% endblock %} {% block buttons %} - Cancel -{% if obj.pk %} + Cancel + {% if obj.pk %} -{% else %} + {% else %} -{% endif %} + {% endif %} {% endblock %}