mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
initial static select2 fields
This commit is contained in:
@@ -19,7 +19,7 @@ from utilities.forms import (
|
||||
BulkEditNullBooleanSelect, ChainedFieldsMixin, ChainedModelChoiceField, ColorSelect, CommentField, ComponentForm,
|
||||
ConfirmationForm, ContentTypeSelect, CSVChoiceField, ExpandableNameField, FilterChoiceField,
|
||||
FilterTreeNodeMultipleChoiceField, FlexibleModelChoiceField, JSONField, Livesearch, SelectWithPK, SmallTextarea,
|
||||
SlugField, BOOLEAN_WITH_BLANK_CHOICES, COLOR_CHOICES,
|
||||
SlugField, StaticSelect2, BOOLEAN_WITH_BLANK_CHOICES, COLOR_CHOICES,
|
||||
|
||||
)
|
||||
from virtualization.models import Cluster, ClusterGroup
|
||||
@@ -109,7 +109,10 @@ class RegionFilterForm(BootstrapMixin, forms.Form):
|
||||
class SiteForm(BootstrapMixin, TenancyForm, CustomFieldForm):
|
||||
region = TreeNodeChoiceField(
|
||||
queryset=Region.objects.all(),
|
||||
required=False
|
||||
required=False,
|
||||
widget=APISelect(
|
||||
api_url="/api/dcim/regions/"
|
||||
)
|
||||
)
|
||||
slug = SlugField()
|
||||
comments = CommentField()
|
||||
@@ -135,6 +138,8 @@ class SiteForm(BootstrapMixin, TenancyForm, CustomFieldForm):
|
||||
'rows': 3,
|
||||
}
|
||||
),
|
||||
'status': StaticSelect2(),
|
||||
'time_zone': StaticSelect2(),
|
||||
}
|
||||
help_texts = {
|
||||
'name': "Full name of the site",
|
||||
|
Reference in New Issue
Block a user