From c10b8cf55b440a2b42e9db482b7e0b8715d7fa92 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Wed, 17 Mar 2021 13:00:20 -0700 Subject: [PATCH] bootstrap 5 template updates --- netbox/templates/dcim/devicebay.html | 72 ++++++++++--------- netbox/templates/dcim/devicebay_populate.html | 36 ++++------ .../dcim/devicetype_component_add.html | 37 ++++------ 3 files changed, 63 insertions(+), 82 deletions(-) diff --git a/netbox/templates/dcim/devicebay.html b/netbox/templates/dcim/devicebay.html index 13b019812..f0e389c54 100644 --- a/netbox/templates/dcim/devicebay.html +++ b/netbox/templates/dcim/devicebay.html @@ -5,60 +5,64 @@ {% block content %}
-
-
- Device Bay +
+
+ Device Bay +
+
+ + + + + + + + + + + + + + + + + +
Device + {{ object.device }} +
Name{{ object.name }}
Label{{ object.label|placeholder }}
Description{{ object.description|placeholder }}
- - - - - - - - - - - - - - - - - -
Device - {{ object.device }} -
Name{{ object.name }}
Label{{ object.label|placeholder }}
Description{{ object.description|placeholder }}
- {% include 'inc/custom_fields_panel.html' %} - {% include 'extras/inc/tags_panel.html' with tags=object.tags.all %} - {% plugin_left_page object %} + {% include 'inc/custom_fields_panel.html' %} + {% include 'extras/inc/tags_panel.html' with tags=object.tags.all %} + {% plugin_left_page object %}
-
-
- Installed Device -
+
+
+ Installed Device +
+
{% if object.installed_device %} {% with device=object.installed_device %} - +
- + - +
DeviceDevice {{ device }}
Device TypeDevice Type {{ device.device_type }}
{% endwith %} {% else %} -
+
None
{% endif %} +
{% plugin_right_page object %}
diff --git a/netbox/templates/dcim/devicebay_populate.html b/netbox/templates/dcim/devicebay_populate.html index d3024c10b..bb04f7999 100644 --- a/netbox/templates/dcim/devicebay_populate.html +++ b/netbox/templates/dcim/devicebay_populate.html @@ -1,41 +1,31 @@ {% extends 'base.html' %} {% load form_helpers %} +{% render_errors form %} + {% block content %} -
+ {% csrf_token %}
- {% if form.non_field_errors %} -
-
Errors
-
- {{ form.non_field_errors }} +
+
{% block title %}Populate {{ device_bay }}{% endblock %}
+
+
+ +
-
- {% endif %} -
-
{% block title %}Populate {{ device_bay }}{% endblock %}
-
-
- -
-

{{ device_bay.device }}

-
-
-
- -
-

{{ device_bay }}

-
+
+ +
{% render_form form %}
+ Cancel - Cancel
diff --git a/netbox/templates/dcim/devicetype_component_add.html b/netbox/templates/dcim/devicetype_component_add.html index a085b8d15..fc5b3b0a8 100644 --- a/netbox/templates/dcim/devicetype_component_add.html +++ b/netbox/templates/dcim/devicetype_component_add.html @@ -3,39 +3,26 @@ {% block title %}Add {{ component_type }} to {{ parent }}{% endblock %} +{% render_errors form %} + {% block content %} - + {% csrf_token %}
- {% if form.non_field_errors %} -
-
Errors
-
- {{ form.non_field_errors }} -
-
- {% endif %} -
-
- New {{ component_type }} -
-
-
- -
-

{{ parent }}

-
+
+

New {{ component_type }}

+
+ +
{% render_form form %}
-
-
- - Cancel -
-
+
+ Cancel + +