mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
added extra add another param
This commit is contained in:
parent
c462bf06fd
commit
adc00650c7
@ -136,6 +136,16 @@ class ACLInterfaceAssignmentEditView(generic.ObjectEditView):
|
||||
form = forms.ACLInterfaceAssignmentForm
|
||||
template_name = "netbox_acls/aclinterfaceassignment_edit.html"
|
||||
|
||||
def get_extra_addanother_params(self, request):
|
||||
"""
|
||||
Returns a dictionary of additional parameters to be passed to the "Add Another" button.
|
||||
"""
|
||||
|
||||
return {
|
||||
"access_list": request.GET.get("access_list") or request.POST.get("access_list"),
|
||||
"direction": request.GET.get("direction") or request.POST.get("direction"),
|
||||
}
|
||||
|
||||
|
||||
class ACLInterfaceAssignmentDeleteView(generic.ObjectDeleteView):
|
||||
"""
|
||||
@ -183,6 +193,15 @@ class ACLStandardRuleEditView(generic.ObjectEditView):
|
||||
queryset = models.ACLStandardRule.objects.all()
|
||||
form = forms.ACLStandardRuleForm
|
||||
|
||||
def get_extra_addanother_params(self, request):
|
||||
"""
|
||||
Returns a dictionary of additional parameters to be passed to the "Add Another" button.
|
||||
"""
|
||||
|
||||
return {
|
||||
"access_list": request.GET.get("access_list") or request.POST.get("access_list"),
|
||||
}
|
||||
|
||||
|
||||
class ACLStandardRuleDeleteView(generic.ObjectDeleteView):
|
||||
"""
|
||||
@ -230,6 +249,15 @@ class ACLExtendedRuleEditView(generic.ObjectEditView):
|
||||
queryset = models.ACLExtendedRule.objects.all()
|
||||
form = forms.ACLExtendedRuleForm
|
||||
|
||||
def get_extra_addanother_params(self, request):
|
||||
"""
|
||||
Returns a dictionary of additional parameters to be passed to the "Add Another" button.
|
||||
"""
|
||||
|
||||
return {
|
||||
"access_list": request.GET.get("access_list") or request.POST.get("access_list"),
|
||||
}
|
||||
|
||||
|
||||
class ACLExtendedRuleDeleteView(generic.ObjectDeleteView):
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user