mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Merge pull request #3005 from alphagov/fix-back-links-tour
Fix back links in tour
This commit is contained in:
@@ -101,8 +101,13 @@ def view_notification(service_id, notification_id):
|
||||
show_cancel_button = notification['notification_type'] == 'letter' and \
|
||||
letter_can_be_cancelled(notification['status'], notification_created)
|
||||
|
||||
if request.args.get('help') == '0':
|
||||
back_link = None
|
||||
if get_help_argument():
|
||||
back_link = url_for(
|
||||
'main.send_test',
|
||||
service_id=current_service.id,
|
||||
template_id=template.id,
|
||||
help='2',
|
||||
)
|
||||
elif request.args.get('from_job'):
|
||||
back_link = url_for(
|
||||
'main.view_job',
|
||||
|
||||
@@ -797,7 +797,20 @@ def get_back_link(service_id, template, step_index):
|
||||
help=get_help_argument()
|
||||
)
|
||||
else:
|
||||
return None
|
||||
if step_index == 0:
|
||||
return url_for(
|
||||
'main.start_tour',
|
||||
service_id=service_id,
|
||||
template_id=template.id,
|
||||
)
|
||||
elif step_index > 0:
|
||||
return url_for(
|
||||
'main.send_test_step',
|
||||
service_id=service_id,
|
||||
template_id=template.id,
|
||||
step_index=step_index - 1,
|
||||
help=2,
|
||||
)
|
||||
elif step_index == 0:
|
||||
if should_skip_template_page(template.template_type):
|
||||
return url_for(
|
||||
|
||||
Reference in New Issue
Block a user