From e01e4d78080223f62947998dbb777271c6a26f2d Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 18 Oct 2022 13:58:21 -0700 Subject: [PATCH] 10643 update other forms --- netbox/circuits/forms/models.py | 6 ++++++ netbox/dcim/forms/models.py | 30 +++++++++++++++++++++++++++ netbox/ipam/forms/models.py | 6 ++++++ netbox/tenancy/forms/models.py | 12 +++++++++++ netbox/virtualization/forms/models.py | 12 +++++++++++ netbox/wireless/forms/models.py | 6 ++++++ 6 files changed, 72 insertions(+) diff --git a/netbox/circuits/forms/models.py b/netbox/circuits/forms/models.py index 7bd7abbbf..aebdce10e 100644 --- a/netbox/circuits/forms/models.py +++ b/netbox/circuits/forms/models.py @@ -76,6 +76,12 @@ class ProviderNetworkForm(NetBoxModelForm): class CircuitTypeForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Circuit Type', ( + 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = CircuitType fields = [ diff --git a/netbox/dcim/forms/models.py b/netbox/dcim/forms/models.py index f4e5ffbf9..0cd981fb0 100644 --- a/netbox/dcim/forms/models.py +++ b/netbox/dcim/forms/models.py @@ -78,6 +78,12 @@ class RegionForm(NetBoxModelForm): ) slug = SlugField() + fieldsets = ( + ('Region', ( + 'parent', 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = Region fields = ( @@ -92,6 +98,12 @@ class SiteGroupForm(NetBoxModelForm): ) slug = SlugField() + fieldsets = ( + ('Site Group', ( + 'parent', 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = SiteGroup fields = ( @@ -213,6 +225,12 @@ class LocationForm(TenancyForm, NetBoxModelForm): class RackRoleForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Region', ( + 'name', 'slug', 'color', 'description', 'tags', + )), + ) + class Meta: model = RackRole fields = [ @@ -340,6 +358,12 @@ class RackReservationForm(TenancyForm, NetBoxModelForm): class ManufacturerForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Manufacturer', ( + 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = Manufacturer fields = [ @@ -1590,6 +1614,12 @@ class InventoryItemForm(DeviceComponentForm): class InventoryItemRoleForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Inventory Item Role', ( + 'name', 'slug', 'color', 'description', 'tags', + )), + ) + class Meta: model = InventoryItemRole fields = [ diff --git a/netbox/ipam/forms/models.py b/netbox/ipam/forms/models.py index 724812585..ca25c0ae8 100644 --- a/netbox/ipam/forms/models.py +++ b/netbox/ipam/forms/models.py @@ -88,6 +88,12 @@ class RouteTargetForm(TenancyForm, NetBoxModelForm): class RIRForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('RIR', ( + 'name', 'slug', 'is_private', 'description', 'tags', + )), + ) + class Meta: model = RIR fields = [ diff --git a/netbox/tenancy/forms/models.py b/netbox/tenancy/forms/models.py index eabcb1d0f..e81288943 100644 --- a/netbox/tenancy/forms/models.py +++ b/netbox/tenancy/forms/models.py @@ -27,6 +27,12 @@ class TenantGroupForm(NetBoxModelForm): ) slug = SlugField() + fieldsets = ( + ('Tenant Group', ( + 'parent', 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = TenantGroup fields = [ @@ -64,6 +70,12 @@ class ContactGroupForm(NetBoxModelForm): ) slug = SlugField() + fieldsets = ( + ('Tenant Group', ( + 'parent', 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = ContactGroup fields = ('parent', 'name', 'slug', 'description', 'tags') diff --git a/netbox/virtualization/forms/models.py b/netbox/virtualization/forms/models.py index 268afb9bb..1b5c5adc6 100644 --- a/netbox/virtualization/forms/models.py +++ b/netbox/virtualization/forms/models.py @@ -28,6 +28,12 @@ __all__ = ( class ClusterTypeForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Cluster Type', ( + 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = ClusterType fields = ( @@ -38,6 +44,12 @@ class ClusterTypeForm(NetBoxModelForm): class ClusterGroupForm(NetBoxModelForm): slug = SlugField() + fieldsets = ( + ('Cluster Group', ( + 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = ClusterGroup fields = ( diff --git a/netbox/wireless/forms/models.py b/netbox/wireless/forms/models.py index bcffcf896..386484193 100644 --- a/netbox/wireless/forms/models.py +++ b/netbox/wireless/forms/models.py @@ -19,6 +19,12 @@ class WirelessLANGroupForm(NetBoxModelForm): ) slug = SlugField() + fieldsets = ( + ('Wireless LAN Group', ( + 'parent', 'name', 'slug', 'description', 'tags', + )), + ) + class Meta: model = WirelessLANGroup fields = [