From c7d6fe2d6236b691b65a73a63db65282bc342bbe Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 17 Aug 2022 15:37:48 -0400 Subject: [PATCH] Fixes #10053: Custom fields header should not be displayed when editing circuit terminations with no custom fields --- docs/release-notes/version-3.3.md | 4 ++++ .../templates/circuits/circuittermination_edit.html | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 98004e2a5..e633e35de 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -2,6 +2,10 @@ ## v3.3.1 (FUTURE) +### Bug Fixes + +* [#10053](https://github.com/netbox-community/netbox/issues/10053) - Custom fields header should not be displayed when editing circuit terminations with no custom fields + --- ## v3.3.0 (2022-08-17) diff --git a/netbox/templates/circuits/circuittermination_edit.html b/netbox/templates/circuits/circuittermination_edit.html index 9c38a3c72..5196eddf2 100644 --- a/netbox/templates/circuits/circuittermination_edit.html +++ b/netbox/templates/circuits/circuittermination_edit.html @@ -49,10 +49,12 @@ {% render_field form.description %} -
-
-
Custom Fields
+ {% if form.custom_fields %} +
+
+
Custom Fields
+
+ {% render_custom_fields form %}
- {% render_custom_fields form %} -
+ {% endif %} {% endblock %}