0001-backoffice-stay-in-backoffice-after-cancelling-a-sub.patch
tests/test_backoffice_pages.py | ||
---|---|---|
682 | 682 | |
683 | 683 |
assert data_class.count() == formdata_count + 1 |
684 | 684 | |
685 |
# test redirection on cancel |
|
686 |
resp = app.get('/backoffice/submission/') |
|
687 |
assert formdef.url_name in resp.body |
|
688 | ||
689 |
resp = resp.click(formdef.name) |
|
690 |
resp.form['f1'] = 'test submission' |
|
691 |
resp = resp.form.submit('cancel') |
|
692 |
assert resp.location == 'http://example.net/backoffice/submission/' |
|
693 | ||
685 | 694 |
def test_backoffice_submission_tracking_code(pub): |
686 | 695 |
user = create_user(pub) |
687 | 696 |
create_environment(pub) |
wcs/forms/root.py | ||
---|---|---|
602 | 602 |
return redirect(cancelurl) |
603 | 603 |
except KeyError: |
604 | 604 |
pass |
605 |
if get_request().is_in_backoffice(): |
|
606 |
return redirect(get_publisher().get_backoffice_url() + '/submission/') |
|
605 | 607 |
return redirect(get_publisher().get_root_url()) |
606 | 608 | |
607 | 609 |
try: |
608 |
- |