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

Enable the use of fieldsets on bulk edit forms

This commit is contained in:
jeremystretch
2022-02-04 09:59:53 -05:00
parent ac1c0b0715
commit 60e87cd496
9 changed files with 273 additions and 13 deletions

View File

@@ -44,6 +44,9 @@ class ProviderBulkEditForm(NetBoxModelBulkEditForm):
)
model = Provider
fieldsets = (
(None, ('asn', 'account', 'portal_url', 'noc_contact', 'admin_contact')),
)
nullable_fields = (
'asn', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'comments',
)
@@ -56,7 +59,8 @@ class ProviderNetworkBulkEditForm(NetBoxModelBulkEditForm):
)
service_id = forms.CharField(
max_length=100,
required=False
required=False,
label='Service ID'
)
description = forms.CharField(
max_length=200,
@@ -68,6 +72,9 @@ class ProviderNetworkBulkEditForm(NetBoxModelBulkEditForm):
)
model = ProviderNetwork
fieldsets = (
(None, ('provider', 'service_id', 'description')),
)
nullable_fields = (
'service_id', 'description', 'comments',
)
@@ -80,6 +87,9 @@ class CircuitTypeBulkEditForm(NetBoxModelBulkEditForm):
)
model = CircuitType
fieldsets = (
(None, ('description',)),
)
nullable_fields = ('description',)
@@ -116,6 +126,9 @@ class CircuitBulkEditForm(NetBoxModelBulkEditForm):
)
model = Circuit
fieldsets = (
(None, ('type', 'provider', 'status', 'tenant', 'commit_rate', 'description')),
)
nullable_fields = (
'tenant', 'commit_rate', 'description', 'comments',
)