Files
notifications-admin/app/templates/views/check-sms.html
2015-12-11 12:02:21 +00:00

50 lines
1.4 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" />
<a class="button-secondary" role="button" href="{{ url_for(".sendsms") }}">Back</a>
</form>
</p>
{% for recipient in recipients %}
{{ sms_message(
message_template|replace_placeholders(recipient),
recipient['phone']
) }}
{% endfor %}
</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 number']}}{% endcall %}
{% call field() %}{{item['date']}}{% endcall %}
{% endcall %}
{% endblock %}