Split ‘send SMS’ page into two pages

This commit just splits the existing page into two. It doesn’t do any
substantive changes to how the two parts of the page work.
This commit is contained in:
Chris Hill-Scott
2016-02-02 17:28:30 +00:00
parent 24cdfd9f64
commit 394a9db3f7
9 changed files with 116 additions and 35 deletions

View File

@@ -3,7 +3,7 @@
<a href="{{ url_for('.service_dashboard', service_id=service_id) }}">{{ session.get('service_name', 'Service') }}</a>
</h2>
<ul>
<li><a href="{{ url_for('.send_sms', service_id=service_id) }}">Send text messages</a></li>
<li><a href="{{ url_for('.choose_sms_template', service_id=service_id) }}">Send text messages</a></li>
<li><a href="{{ url_for('.send_email', service_id=service_id) }}">Send emails</a></li>
<li><a href="{{ url_for('.view_jobs', service_id=service_id) }}">Activity</a></li>
<li><a href="{{ url_for('.manage_service_templates', service_id=service_id) }}">Templates</a></li>

View File

@@ -17,7 +17,7 @@
{% for rejected in upload_result.rejects %}
<p>Line {{rejected.line_number}}: {{rejected.phone }}</a>
{% endfor %}
<p><a href="{{url_for('.send_sms', service_id=service_id)}}" class="button">Go back and resolve errors</a></p>
<p><a href="{{url_for('.send_sms', service_id=service_id, template_id=template_id)}}" class="button">Go back and resolve errors</a></p>
{% else %}
@@ -26,7 +26,7 @@
{{ page_footer(
button_text = "Send {} text messages".format(upload_result.valid|count),
back_link = url_for(".send_sms", service_id=service_id)
back_link = url_for(".send_sms", service_id=service_id, template_id=template_id)
)}}
{% if upload_result.valid | count > 6 %}
@@ -56,7 +56,7 @@
{{ page_footer(
button_text = "Send {} text messages".format(upload_result.valid|count),
back_link = url_for(".send_sms", service_id=service_id)
back_link = url_for(".send_sms", service_id=service_id, template_id=template_id)
)}}
</form>

View File

@@ -0,0 +1,26 @@
{% extends "withnav_template.html" %}
{% from "components/sms-message.html" import sms_message %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/textbox.html" import textbox %}
{% block page_title %}
GOV.UK Notify | Send text messages
{% endblock %}
{% block maincolumn_content %}
<form method="POST" enctype="multipart/form-data">
<h1 class="heading-large">Send text messages</h1>
<fieldset class='form-group'>
{% for template in templates %}
{{ sms_message(
template.content, name=template.name, input_name='template', input_index=template.id
) }}
{% endfor %}
</fieldset>
{{ page_footer("Continue") }}
</form>
{% endblock %}

View File

@@ -13,7 +13,7 @@ GOV.UK Notify | Manage templates
{{ banner(
'<a href="{}">Try sending a text message</a>'.format(
url_for(".send_sms", service_id=service_id)
url_for(".choose_sms_template", service_id=service_id)
)|safe,
subhead='Next step',
type="tip"

View File

@@ -10,34 +10,31 @@
{% block maincolumn_content %}
<form method="POST" enctype="multipart/form-data">
<h1 class="heading-large">Send text messages</h1>
<h1 class="heading-large">Send text messages</h1>
<fieldset class='form-group'>
<legend class="heading-medium">1. Choose text message template</legend>
{% for template in templates %}
{{ sms_message(
template.content, name=template.name, input_name='template', input_index=template.id
) }}
{% endfor %}
</fieldset>
<h2 class="heading-medium">2. Add recipients</h2>
{{ banner(
'You can only send notifications to yourself',
subhead='Trial mode',
type='info'
) }}
<p>
Upload a CSV file to add your recipients details.
</p>
<p>
You can also <a href="#">download an example CSV</a>.
</p>
{{ sms_message(
template.content, name='Preview'
) }}
<p>
{{textbox(form.file)}}
</p>
{{ page_footer("Continue") }}
<p>
<a href="#">Download an example CSV</a> to test with.
</p>
{{ page_footer(
"Continue",
back_link=url_for(".choose_sms_template", service_id=service_id),
back_link_text="Back to templates"
) }}
</form>
{% endblock %}

View File

@@ -34,7 +34,7 @@
{% else %}
{{ banner(
'<a href="{}">Try sending a text message</a>'.format(
url_for(".send_sms", service_id=service_id)
url_for(".choose_sms_template", service_id=service_id)
)|safe,
subhead='Next step',
type="tip"