diff --git a/app/main/views/send.py b/app/main/views/send.py index c3a0fcb2f..faeb3acf4 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -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) diff --git a/app/templates/views/send-test.html b/app/templates/views/send-test.html index 95f298c30..600a3d2b4 100644 --- a/app/templates/views/send-test.html +++ b/app/templates/views/send-test.html @@ -14,7 +14,7 @@ {% if request.args['help'] %}

Example text message

{% else %} -

Send a test

+

Send yourself a test

{% endif %} {% if 'sms' == template.template_type %} diff --git a/app/templates/views/send.html b/app/templates/views/send.html index 4b85152bc..8247eee35 100644 --- a/app/templates/views/send.html +++ b/app/templates/views/send.html @@ -35,9 +35,7 @@ diff --git a/app/templates/views/templates/_template.html b/app/templates/views/templates/_template.html index fca57b9fa..3cfd64051 100644 --- a/app/templates/views/templates/_template.html +++ b/app/templates/views/templates/_template.html @@ -26,7 +26,10 @@ Send {{ 'text messages' if 'sms' == template.template_type else 'emails' }} - {% endif %} + + Send yourself a test + + {% endif %} {% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %} Edit template {% endif %}