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

View File

@@ -12,15 +12,23 @@
<h1 class="heading-large">Send text messages</h1> <h1 class="heading-large">Send text messages</h1>
<fieldset class='form-group'> {% if templates %}
{% for template in templates %} <fieldset class='form-group'>
{{ sms_message( {% for template in templates %}
template.content, name=template.name, input_name='template', input_index=template.id {{ sms_message(
) }} template.content, name=template.name, input_name='template', input_index=template.id
{% endfor %} ) }}
</fieldset> {% endfor %}
</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 %}