Просмотр исходного кода

Expanded cable connection form

Jeremy Stretch 7 лет назад
Родитель
Сommit
f7e23d912c
2 измененных файлов с 5 добавлено и 1 удалено
  1. 1 1
      netbox/dcim/forms.py
  2. 4 0
      netbox/templates/dcim/cable_connect.html

+ 1 - 1
netbox/dcim/forms.py

@@ -2179,7 +2179,7 @@ class CableCreateForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelForm):
         model = Cable
         fields = [
             'termination_b_site', 'termination_b_rack', 'termination_b_device', 'livesearch', 'termination_b_type',
-            'termination_b_id', 'status', 'label',
+            'termination_b_id', 'type', 'status', 'label', 'color', 'length', 'length_unit',
         ]
 
     def __init__(self, *args, **kwargs):

+ 4 - 0
netbox/templates/dcim/cable_connect.html

@@ -116,8 +116,12 @@
         </div>
         <div class="row">
             <div class="col-md-4 col-md-offset-4">
+                {% render_field form.type %}
                 {% render_field form.status %}
                 {% render_field form.label %}
+                {% render_field form.color %}
+                {% render_field form.length %}
+                {% render_field form.length_unit %}
             </div>
         </div>
         <div class="form-group">