From c774b82ba93f3d8ed45ae75a31bcac02b21585cf Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 3 Feb 2016 13:38:55 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20user=20to=20send=20text?= =?UTF-8?q?s=20without=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/views/choose-sms-template.html | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app/templates/views/choose-sms-template.html b/app/templates/views/choose-sms-template.html index 99eb404eb..5599cb1e2 100644 --- a/app/templates/views/choose-sms-template.html +++ b/app/templates/views/choose-sms-template.html @@ -12,15 +12,23 @@

Send text messages

-
- {% for template in templates %} - {{ sms_message( - template.content, name=template.name, input_name='template', input_index=template.id - ) }} - {% endfor %} -
- - {{ page_footer("Continue") }} + {% if templates %} +
+ {% for template in templates %} + {{ sms_message( + template.content, name=template.name, input_name='template', input_index=template.id + ) }} + {% endfor %} +
+ {{ page_footer("Continue") }} + {% else %} + {{ banner( + 'Add a text message template to start sending messages'.format( + url_for(".add_service_template", service_id=service_id) + )|safe, + type="tip" + )}} + {% endif %} {% endblock %}