Don’t allow user to send texts without template

This commit is contained in:
Chris Hill-Scott
2016-02-03 13:38:55 +00:00
parent 8d3e3e6943
commit c774b82ba9
+9 -1
View File
@@ -12,6 +12,7 @@
<h1 class="heading-large">Send text messages</h1> <h1 class="heading-large">Send text messages</h1>
{% if templates %}
<fieldset class='form-group'> <fieldset class='form-group'>
{% for template in templates %} {% for template in templates %}
{{ sms_message( {{ sms_message(
@@ -19,8 +20,15 @@
) }} ) }}
{% endfor %} {% endfor %}
</fieldset> </fieldset>
{{ page_footer("Continue") }} {{ page_footer("Continue") }}
{% else %}
{{ banner(
'<a href="{}">Add a text message template</a> to start sending messages'.format(
url_for(".add_service_template", service_id=service_id)
)|safe,
type="tip"
)}}
{% endif %}
</form> </form>
{% endblock %} {% endblock %}