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

Initial work on #6235

This commit is contained in:
jeremystretch
2021-11-01 16:14:44 -04:00
parent e0230ed104
commit bb4f3e1789
33 changed files with 959 additions and 17 deletions

View File

@ -13,6 +13,7 @@ from utilities.forms import (
__all__ = (
'AggregateBulkEditForm',
'FHRPGroupBulkEditForm',
'IPAddressBulkEditForm',
'IPRangeBulkEditForm',
'PrefixBulkEditForm',
@ -280,6 +281,41 @@ class IPAddressBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldModelB
]
class FHRPGroupBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldModelBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=FHRPGroup.objects.all(),
widget=forms.MultipleHiddenInput()
)
protocol = forms.ChoiceField(
choices=add_blank_choice(FHRPGroupProtocolChoices),
required=False,
widget=StaticSelect()
)
group_id = forms.IntegerField(
min_value=0,
required=False,
label='Group ID'
)
auth_type = forms.ChoiceField(
choices=add_blank_choice(FHRPGroupAuthTypeChoices),
required=False,
widget=StaticSelect(),
label='Authentication type'
)
auth_key = forms.CharField(
max_length=255,
required=False,
label='Authentication key'
)
description = forms.CharField(
max_length=200,
required=False
)
class Meta:
nullable_fields = ['auth_type', 'auth_key', 'description']
class VLANGroupBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldModelBulkEditForm):
pk = forms.ModelMultipleChoiceField(
queryset=VLANGroup.objects.all(),