Skip to content

Commit 93f0cd4

Browse files
committed
feat(form): ACLExtendedRule: Instruct new Sources to be displayed as Tabbed Group; Improve Fieldsets
1 parent d9704a0 commit 93f0cd4

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

netbox_acls/forms/models.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -617,18 +617,29 @@ class ACLExtendedRuleForm(NetBoxModelForm):
617617
label="Destination Prefix",
618618
)
619619
fieldsets = (
620-
("Access List Details", ("access_list", "description", "tags")),
621-
(
622-
"Rule Definition",
623-
(
624-
"index",
625-
"action",
626-
"remark",
627-
"source_prefix",
628-
"source_ports",
629-
"destination_prefix",
630-
"destination_ports",
631-
"protocol",
620+
FieldSet(
621+
"access_list",
622+
"description",
623+
"tags",
624+
name=_('Access List Details')
625+
),
626+
FieldSet(
627+
"index",
628+
"action",
629+
"remark",
630+
"protocol",
631+
name=_('Rule Definition')
632+
),
633+
FieldSet(
634+
TabbedGroups(
635+
FieldSet('source_prefix', name=_('Prefix')),
636+
FieldSet('source_iprange', name=_('IP Range')),
637+
FieldSet('source_ipaddress', name=_('IP Address')),
638+
FieldSet('source_aggregate', name=_('Aggregate')),
639+
FieldSet('source_service', name=_('Service')),
640+
),
641+
"source_ports",
642+
),
632643
),
633644
),
634645
)

0 commit comments

Comments
 (0)