Files
notifications-admin/app/templates/views/check-sms.html
Chris Hill-Scott 8a34fa7e0a Use Flask for routing
This commit:
- replaces links that look like buttons with forms and submit buttons
- splits the view code for SMS into its own file
- moves the routing into the Python by adding handling for `post` requests
- uses Flask’s `url_for` to generate URLs, rather than hard coding them (so that
  it’s easier to change the URLs)
- chages the URLs for sending text messages
2015-12-11 09:49:38 +00:00

41 lines
1.1 KiB
HTML

{% extends "admin_template.html" %}
{% from "components/sms-message.html" import sms_message %}
{% from "components/table.html" import table, field %}
{% from "components/placeholder.html" import placeholder %}
{% block page_title %}
GOV.UK Notify | Send text messages
{% endblock %}
{% block content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Send text messages</h1>
<h2 class="heading-medium">Check and confirm</h2>
{{ sms_message(message_template) }}
<p>
<form method="POST" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button" value="Send {{recipients|length}} text messages" />
</form>
</p>
</div>
</div>
{% call(item) table(
recipients,
caption="Preview of the first 3 recipients",
field_headings=[
'Recipient', placeholder('registration number'), placeholder('date')
]
) %}
{% call field() %}{{item.phone}}{% endcall %}
{% call field() %}{{item.registration}}{% endcall %}
{% call field() %}{{item.date}}{% endcall %}
{% endcall %}
{% endblock %}