mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Remove StaticSelect, StaticSelectMultiple form widgets * Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
This commit is contained in:
committed by
jeremystretch
parent
c73829fe92
commit
b9bd96f0c7
@@ -1,3 +1,4 @@
|
||||
from django import forms
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
@@ -7,7 +8,7 @@ from tenancy.choices import *
|
||||
from tenancy.models import *
|
||||
from tenancy.forms import ContactModelFilterForm
|
||||
from utilities.forms.fields import (
|
||||
ContentTypeMultipleChoiceField, DynamicModelMultipleChoiceField, MultipleChoiceField, TagFilterField,
|
||||
ContentTypeMultipleChoiceField, DynamicModelMultipleChoiceField, TagFilterField,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@@ -106,7 +107,7 @@ class ContactAssignmentFilterForm(NetBoxModelFilterSetForm):
|
||||
required=False,
|
||||
label=_('Role')
|
||||
)
|
||||
priority = MultipleChoiceField(
|
||||
priority = forms.MultipleChoiceField(
|
||||
choices=ContactPriorityChoices,
|
||||
required=False
|
||||
)
|
||||
|
@@ -3,7 +3,7 @@ from django import forms
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from tenancy.models import *
|
||||
from utilities.forms import (
|
||||
BootstrapMixin, CommentField, DynamicModelChoiceField, SlugField, StaticSelect,
|
||||
BootstrapMixin, CommentField, DynamicModelChoiceField, SlugField,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@@ -142,5 +142,4 @@ class ContactAssignmentForm(BootstrapMixin, forms.ModelForm):
|
||||
widgets = {
|
||||
'content_type': forms.HiddenInput(),
|
||||
'object_id': forms.HiddenInput(),
|
||||
'priority': StaticSelect(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user