mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
This commit is contained in:
parent
a9a5712e7f
commit
045d236479
@ -170,6 +170,9 @@ In addition to the [form fields provided by Django](https://docs.djangoproject.c
|
|||||||
|
|
||||||
## Choice Fields
|
## Choice Fields
|
||||||
|
|
||||||
|
!!! warning "Obsolete Fields"
|
||||||
|
NetBox's custom `ChoiceField` and `MultipleChoiceField` classes are no longer necessary thanks to improvements made to the user interface. Django's native form fields can be used instead. These custom field classes will be removed in NetBox v3.6.
|
||||||
|
|
||||||
::: utilities.forms.ChoiceField
|
::: utilities.forms.ChoiceField
|
||||||
options:
|
options:
|
||||||
members: false
|
members: false
|
||||||
|
@ -129,8 +129,7 @@ class SiteForm(TenancyForm, NetBoxModelForm):
|
|||||||
slug = SlugField()
|
slug = SlugField()
|
||||||
time_zone = TimeZoneFormField(
|
time_zone = TimeZoneFormField(
|
||||||
choices=add_blank_choice(TimeZoneFormField().choices),
|
choices=add_blank_choice(TimeZoneFormField().choices),
|
||||||
required=False,
|
required=False
|
||||||
# widget=StaticSelect()
|
|
||||||
)
|
)
|
||||||
comments = CommentField()
|
comments = CommentField()
|
||||||
|
|
||||||
@ -159,8 +158,6 @@ class SiteForm(TenancyForm, NetBoxModelForm):
|
|||||||
'rows': 3,
|
'rows': 3,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
# 'status': StaticSelect(),
|
|
||||||
# 'time_zone': StaticSelect(),
|
|
||||||
}
|
}
|
||||||
help_texts = {
|
help_texts = {
|
||||||
'name': _("Full name of the site"),
|
'name': _("Full name of the site"),
|
||||||
|
@ -138,7 +138,7 @@ class ChoiceField(forms.ChoiceField):
|
|||||||
"""
|
"""
|
||||||
Previously used to override Django's built-in `ChoiceField` to use NetBox's now-obsolete `StaticSelect` widget.
|
Previously used to override Django's built-in `ChoiceField` to use NetBox's now-obsolete `StaticSelect` widget.
|
||||||
"""
|
"""
|
||||||
# TODO: Remove in v4.0
|
# TODO: Remove in v3.6
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -147,5 +147,5 @@ class MultipleChoiceField(forms.MultipleChoiceField):
|
|||||||
Previously used to override Django's built-in `MultipleChoiceField` to use NetBox's now-obsolete
|
Previously used to override Django's built-in `MultipleChoiceField` to use NetBox's now-obsolete
|
||||||
`StaticSelectMultiple` widget.
|
`StaticSelectMultiple` widget.
|
||||||
"""
|
"""
|
||||||
# TODO: Remove in v4.0
|
# TODO: Remove in v3.6
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user