@@ -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'
)
@@ -1,5 +1,6 @@
{% extends '_base.html' %}
{% load static %}
+{% load helpers %}
{% load form_helpers %}
{% block content %}
@@ -49,6 +50,12 @@
<p class="form-control-static">{{ termination_a.device }}</p>
</div>
+ <div class="form-group">
+ <label class="col-md-3 control-label required">Type</label>
+ <div class="col-md-9">
+ <p class="form-control-static">{{ termination_a|model_name|capfirst }}</p>
+ </div>
<div class="form-group">
<label class="col-md-3 control-label required">Name</label>
<div class="col-md-9">
@@ -1,3 +1,4 @@
<table class="table table-hover panel-body attr-table">
{% if termination.device %}
{# Device component #}
@@ -7,6 +8,12 @@
<a href="{{ termination.device.get_absolute_url }}">{{ termination.device }}</a>
</td>
</tr>
+ <tr>
+ <td>Type</td>
+ <td>
+ {{ termination|model_name|capfirst }}
+ </td>
+ </tr>
<tr>
<td>Component</td>
<td>{{ termination }}</td>
@@ -1 +1 @@
-<option value="{{ widget.value }}"{% include "django/forms/widgets/attrs.html" %}{% if widget.value %} api-value="{{ widget.label|slugify }}"{% endif %}>{{ widget.label.label|default:widget.label }}</option>
+<option value="{{ widget.value }}"{% include "django/forms/widgets/attrs.html" %}{% if widget.value %} api-value="{{ widget.label|slugify }}"{% endif %}>{{ widget.label.label|default:widget.label|capfirst }}</option>