diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 7b8c13ffa..257907015 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1851,6 +1851,8 @@ class CableCreateForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelForm): termination_a_type = self.instance.termination_a._meta.model_name self.fields['termination_b_type'].queryset = ContentType.objects.filter( model__in=COMPATIBLE_TERMINATION_TYPES.get(termination_a_type) + ).exclude( + model='circuittermination' ) diff --git a/netbox/templates/dcim/cable_connect.html b/netbox/templates/dcim/cable_connect.html index 9706dad9f..4b431ed16 100644 --- a/netbox/templates/dcim/cable_connect.html +++ b/netbox/templates/dcim/cable_connect.html @@ -1,5 +1,6 @@ {% extends '_base.html' %} {% load static %} +{% load helpers %} {% load form_helpers %} {% block content %} @@ -49,6 +50,12 @@

{{ termination_a.device }}

+
+ +
+

{{ termination_a|model_name|capfirst }}

+
+
diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index e1b0959bb..e7b2891e7 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -1,3 +1,4 @@ +{% load helpers %} {% if termination.device %} {# Device component #} @@ -7,6 +8,12 @@ {{ termination.device }} + + + + diff --git a/netbox/utilities/templates/widgets/select_contenttype.html b/netbox/utilities/templates/widgets/select_contenttype.html index ca7fe326e..04c42c371 100644 --- a/netbox/utilities/templates/widgets/select_contenttype.html +++ b/netbox/utilities/templates/widgets/select_contenttype.html @@ -1 +1 @@ - +
Type + {{ termination|model_name|capfirst }} +
Component {{ termination }}