backoffice: redirect to filtered listing after mass action (#55356)
This commit is contained in:
parent
6be1ce99d4
commit
3a5da7d895
|
@ -1589,7 +1589,7 @@ def test_backoffice_multi_actions(pub):
|
|||
trigger.roles = [x.id for x in pub.role_class.select() if x.name == 'foobar']
|
||||
workflow.store()
|
||||
|
||||
resp = app.get('/backoffice/management/form-title/')
|
||||
resp = app.get('/backoffice/management/form-title/?limit=20')
|
||||
assert 'id="multi-actions"' in resp.text
|
||||
ids = []
|
||||
for checkbox in resp.forms[0].fields['select[]'][1:6]:
|
||||
|
@ -1600,6 +1600,10 @@ def test_backoffice_multi_actions(pub):
|
|||
resp = resp.follow()
|
||||
assert 'Executing task "FOOBAR" on forms' in resp.text
|
||||
assert '>completed<' in resp.text
|
||||
assert (
|
||||
resp.pyquery.find('[data-redirect-auto]').attr['href']
|
||||
== '/backoffice/management/form-title/?limit=20'
|
||||
)
|
||||
for id in ids:
|
||||
assert formdef.data_class().get(id).status == 'wf-finished'
|
||||
|
||||
|
|
|
@ -2145,6 +2145,7 @@ class FormPage(Directory):
|
|||
query_string=get_request().get_query(),
|
||||
action_id=action['action'].id,
|
||||
item_ids=item_ids,
|
||||
return_url=get_request().get_path_query(),
|
||||
)
|
||||
)
|
||||
job.store()
|
||||
|
@ -3777,8 +3778,7 @@ class MassActionAfterJob(AfterJob):
|
|||
self.store()
|
||||
|
||||
def done_action_url(self):
|
||||
formdef = self.kwargs['formdef_class'].get(self.kwargs['formdef_id'])
|
||||
return formdef.get_url(backoffice=True)
|
||||
return self.kwargs['return_url']
|
||||
|
||||
def done_action_label(self):
|
||||
return _('Back to Listing')
|
||||
|
|
Loading…
Reference in New Issue