1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #3310: Pre-select site/rack for B side when creating a new cable

This commit is contained in:
Jeremy Stretch
2020-01-22 16:07:09 -05:00
parent b7dea5a9f7
commit f826e15603
6 changed files with 42 additions and 38 deletions

View File

@ -3168,6 +3168,11 @@ class ConnectCableToDeviceForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelFo
'termination_b_site', 'termination_b_rack', 'termination_b_device', 'termination_b_id', 'type', 'status',
'label', 'color', 'length', 'length_unit',
]
widgets = {
'status': StaticSelect2,
'type': StaticSelect2,
'length_unit': StaticSelect2,
}
class ConnectCableToConsolePortForm(ConnectCableToDeviceForm):
@ -3363,6 +3368,11 @@ class CableForm(BootstrapMixin, forms.ModelForm):
fields = [
'type', 'status', 'label', 'color', 'length', 'length_unit',
]
widgets = {
'status': StaticSelect2,
'type': StaticSelect2,
'length_unit': StaticSelect2,
}
class CableCSVForm(forms.ModelForm):