mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Move ‘send test’ link back to template page
This changes it back to how it was when we first introduced this feature: https://github.com/alphagov/notifications-admin/pull/181 It’s kind of lost on the page where you upload a file, which is a shame because it’s a good teaching aid.
This commit is contained in:
@@ -242,11 +242,16 @@ def check_messages(service_id, template_type, upload_id):
|
||||
) if current_service['restricted'] else None
|
||||
)
|
||||
|
||||
if request.args.get('from_test') and len(template.placeholders):
|
||||
if request.args.get('from_test'):
|
||||
extra_args = {'help': 1} if request.args.get('help', '0') != '0' else {}
|
||||
back_link = url_for(
|
||||
'.send_test', service_id=service_id, template_id=template.id, **extra_args
|
||||
)
|
||||
if len(template.placeholders):
|
||||
back_link = url_for(
|
||||
'.send_test', service_id=service_id, template_id=template.id, **extra_args
|
||||
)
|
||||
else:
|
||||
back_link = url_for(
|
||||
'.choose_template', service_id=service_id, template_type=template.template_type, **extra_args
|
||||
)
|
||||
else:
|
||||
back_link = url_for('.send_messages', service_id=service_id, template_id=template.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user