@@ -136,6 +136,16 @@ class ACLInterfaceAssignmentEditView(generic.ObjectEditView):
136
136
form = forms .ACLInterfaceAssignmentForm
137
137
template_name = "netbox_acls/aclinterfaceassignment_edit.html"
138
138
139
+ def get_extra_addanother_params (self , request ):
140
+ """
141
+ Returns a dictionary of additional parameters to be passed to the "Add Another" button.
142
+ """
143
+
144
+ return {
145
+ "access_list" : request .GET .get ("access_list" ) or request .POST .get ("access_list" ),
146
+ "direction" : request .GET .get ("direction" ) or request .POST .get ("direction" ),
147
+ }
148
+
139
149
140
150
class ACLInterfaceAssignmentDeleteView (generic .ObjectDeleteView ):
141
151
"""
@@ -183,6 +193,15 @@ class ACLStandardRuleEditView(generic.ObjectEditView):
183
193
queryset = models .ACLStandardRule .objects .all ()
184
194
form = forms .ACLStandardRuleForm
185
195
196
+ def get_extra_addanother_params (self , request ):
197
+ """
198
+ Returns a dictionary of additional parameters to be passed to the "Add Another" button.
199
+ """
200
+
201
+ return {
202
+ "access_list" : request .GET .get ("access_list" ) or request .POST .get ("access_list" ),
203
+ }
204
+
186
205
187
206
class ACLStandardRuleDeleteView (generic .ObjectDeleteView ):
188
207
"""
@@ -230,6 +249,15 @@ class ACLExtendedRuleEditView(generic.ObjectEditView):
230
249
queryset = models .ACLExtendedRule .objects .all ()
231
250
form = forms .ACLExtendedRuleForm
232
251
252
+ def get_extra_addanother_params (self , request ):
253
+ """
254
+ Returns a dictionary of additional parameters to be passed to the "Add Another" button.
255
+ """
256
+
257
+ return {
258
+ "access_list" : request .GET .get ("access_list" ) or request .POST .get ("access_list" ),
259
+ }
260
+
233
261
234
262
class ACLExtendedRuleDeleteView (generic .ObjectDeleteView ):
235
263
"""
0 commit comments