Make text of ‘send’ button say ‘email’ or ‘text…’

Previously the send button on the ‘Check and confirm’ page always said
‘Send x messages’, irrespective of whether you were sending emails or text
messages.

This commit makes it say one of
- Send 1 email
- Send 29 emails
- Send 1 text message
- Send 999 text messages
This commit is contained in:
Chris Hill-Scott
2016-03-09 12:22:12 +00:00
parent b93a1e89c8
commit 91e9cd37b1
2 changed files with 15 additions and 1 deletions

View File

@@ -66,7 +66,7 @@
{% else %}
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button" value="{{ "Send {} message{}".format(count_of_recipients, '' if count_of_recipients == 1 else 's') }}" />
<input type="submit" class="button" value="{{ send_button_text }}" />
<a href="{{url_for('.send_messages', service_id=service_id, template_id=template.id)}}" class="page-footer-back-link">Back</a>
</form>
{% endif %}