Fix CSV import test & form cleanup

This commit is contained in:
jeremystretch 2022-01-10 14:27:52 -05:00
parent 0f58faaddb
commit ff396b5953
2 changed files with 3 additions and 1 deletions

View File

@ -620,6 +620,7 @@ class InterfaceCSVForm(CustomFieldModelCSVForm):
) )
duplex = CSVChoiceField( duplex = CSVChoiceField(
choices=InterfaceDuplexChoices, choices=InterfaceDuplexChoices,
required=False,
help_text='Duplex' help_text='Duplex'
) )
mode = CSVChoiceField( mode = CSVChoiceField(

View File

@ -1292,10 +1292,11 @@ class InterfaceForm(InterfaceCommonForm, CustomFieldModelForm):
widgets = { widgets = {
'device': forms.HiddenInput(), 'device': forms.HiddenInput(),
'type': StaticSelect(), 'type': StaticSelect(),
'speed': SelectSpeedWidget(),
'duplex': StaticSelect(),
'mode': StaticSelect(), 'mode': StaticSelect(),
'rf_role': StaticSelect(), 'rf_role': StaticSelect(),
'rf_channel': StaticSelect(), 'rf_channel': StaticSelect(),
'speed': SelectSpeedWidget(attrs={'readonly': None}),
} }
labels = { labels = {
'mode': '802.1Q Mode', 'mode': '802.1Q Mode',