mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Fixes #2148: Do not force timezone selection when editing sites in bulk
This commit is contained in:
parent
643b0eaf65
commit
862e44e96f
@ -166,13 +166,37 @@ class SiteCSVForm(forms.ModelForm):
|
|||||||
|
|
||||||
|
|
||||||
class SiteBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
|
class SiteBulkEditForm(BootstrapMixin, CustomFieldBulkEditForm):
|
||||||
pk = forms.ModelMultipleChoiceField(queryset=Site.objects.all(), widget=forms.MultipleHiddenInput)
|
pk = forms.ModelMultipleChoiceField(
|
||||||
status = forms.ChoiceField(choices=add_blank_choice(SITE_STATUS_CHOICES), required=False, initial='')
|
queryset=Site.objects.all(),
|
||||||
region = TreeNodeChoiceField(queryset=Region.objects.all(), required=False)
|
widget=forms.MultipleHiddenInput
|
||||||
tenant = forms.ModelChoiceField(queryset=Tenant.objects.all(), required=False)
|
)
|
||||||
asn = forms.IntegerField(min_value=1, max_value=4294967295, required=False, label='ASN')
|
status = forms.ChoiceField(
|
||||||
description = forms.CharField(max_length=100, required=False)
|
choices=add_blank_choice(SITE_STATUS_CHOICES),
|
||||||
time_zone = TimeZoneFormField(required=False)
|
required=False,
|
||||||
|
initial=''
|
||||||
|
)
|
||||||
|
region = TreeNodeChoiceField(
|
||||||
|
queryset=Region.objects.all(),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
tenant = forms.ModelChoiceField(
|
||||||
|
queryset=Tenant.objects.all(),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
asn = forms.IntegerField(
|
||||||
|
min_value=1,
|
||||||
|
max_value=4294967295,
|
||||||
|
required=False,
|
||||||
|
label='ASN'
|
||||||
|
)
|
||||||
|
description = forms.CharField(
|
||||||
|
max_length=100,
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
time_zone = TimeZoneFormField(
|
||||||
|
choices=add_blank_choice(TimeZoneFormField().choices),
|
||||||
|
required=False
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
nullable_fields = ['region', 'tenant', 'asn', 'description', 'time_zone']
|
nullable_fields = ['region', 'tenant', 'asn', 'description', 'time_zone']
|
||||||
|
Loading…
Reference in New Issue
Block a user