Kaynağa Gözat

Fixes #10053: Custom fields header should not be displayed when editing circuit terminations with no custom fields

jeremystretch 3 yıl önce
ebeveyn
işleme
c7d6fe2d62

+ 4 - 0
docs/release-notes/version-3.3.md

@@ -2,6 +2,10 @@
 
 
 ## v3.3.1 (FUTURE)
 ## 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)
 ## v3.3.0 (2022-08-17)

+ 7 - 5
netbox/templates/circuits/circuittermination_edit.html

@@ -49,10 +49,12 @@
     {% render_field form.description %}
     {% render_field form.description %}
   </div>
   </div>
 
 
-  <div class="field-group my-5">
-    <div class="row mb-2">
-      <h5 class="offset-sm-3">Custom Fields</h5>
+  {% if form.custom_fields %}
+    <div class="field-group mb-5">
+      <div class="row mb-2">
+        <h5 class="offset-sm-3">Custom Fields</h5>
+      </div>
+      {% render_custom_fields form %}
     </div>
     </div>
-    {% render_custom_fields form %}
-  </div>
+  {% endif %}
 {% endblock %}
 {% endblock %}