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

Refactor form rendering components & add docstrings

This commit is contained in:
Jeremy Stretch
2024-03-15 12:59:42 -04:00
parent 2aaa552067
commit 3b28e8e615
7 changed files with 54 additions and 36 deletions

View File

@@ -7,7 +7,7 @@ from ipam.models import IPAddress, RouteTarget, VLAN
from netbox.forms import NetBoxModelForm
from tenancy.forms import TenancyForm
from utilities.forms.fields import CommentField, DynamicModelChoiceField, DynamicModelMultipleChoiceField, SlugField
from utilities.forms.rendering import TabbedFieldGroups
from utilities.forms.rendering import TabbedGroups
from utilities.forms.utils import add_blank_choice, get_field_value
from utilities.forms.widgets import HTMXSelect
from virtualization.models import VirtualMachine, VMInterface
@@ -448,7 +448,7 @@ class L2VPNTerminationForm(NetBoxModelForm):
fieldsets = (
(None, (
'l2vpn',
TabbedFieldGroups(
TabbedGroups(
(_('VLAN'), 'vlan'),
(_('Device'), 'interface'),
(_('Virtual Machine'), 'vminterface'),