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

Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)

* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
This commit is contained in:
Jeremy Stretch
2023-02-16 10:25:51 -05:00
committed by jeremystretch
parent c73829fe92
commit b9bd96f0c7
30 changed files with 221 additions and 485 deletions

View File

@@ -11,7 +11,7 @@ from netbox.forms import NetBoxModelForm
from tenancy.forms import TenancyForm
from utilities.forms import (
BootstrapMixin, CommentField, ConfirmationForm, DynamicModelChoiceField, DynamicModelMultipleChoiceField,
JSONField, SlugField, StaticSelect,
JSONField, SlugField,
)
from virtualization.models import *
@@ -102,9 +102,6 @@ class ClusterForm(TenancyForm, NetBoxModelForm):
'name', 'type', 'group', 'status', 'tenant', 'region', 'site_group', 'site', 'description', 'comments',
'tags',
)
widgets = {
'status': StaticSelect(),
}
class ClusterAddDevicesForm(BootstrapMixin, forms.Form):
@@ -244,11 +241,6 @@ class VirtualMachineForm(TenancyForm, NetBoxModelForm):
'local_context_data': _("Local config context data overwrites all sources contexts in the final rendered "
"config context"),
}
widgets = {
"status": StaticSelect(),
'primary_ip4': StaticSelect(),
'primary_ip6': StaticSelect(),
}
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -354,9 +346,6 @@ class VMInterfaceForm(InterfaceCommonForm, NetBoxModelForm):
'virtual_machine', 'name', 'parent', 'bridge', 'enabled', 'mac_address', 'mtu', 'description', 'mode',
'vlan_group', 'untagged_vlan', 'tagged_vlans', 'vrf', 'tags',
]
widgets = {
'mode': StaticSelect()
}
labels = {
'mode': '802.1Q Mode',
}