mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 12:38:25 -04:00
Merge pull request #147 from alphagov/split-sms
Split ‘send SMS’ page into two pages
This commit is contained in:
@@ -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>
|
||||
</ul>
|
||||
<ul>
|
||||
|
||||
@@ -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>
|
||||
|
||||
34
app/templates/views/choose-sms-template.html
Normal file
34
app/templates/views/choose-sms-template.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% 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>
|
||||
|
||||
{% if templates %}
|
||||
<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") }}
|
||||
{% 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>
|
||||
{% endblock %}
|
||||
@@ -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"
|
||||
|
||||
@@ -10,34 +10,32 @@
|
||||
{% 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>
|
||||
{{ sms_message(
|
||||
template.content, name='Preview'
|
||||
) }}
|
||||
|
||||
<h2 class="heading-medium">2. Add recipients</h2>
|
||||
{{ banner(
|
||||
'You can only send notifications to yourself',
|
||||
subhead='Trial mode',
|
||||
'You can only send messages to yourself until you <a href="{}">request to go live</a>'.format(
|
||||
url_for('.service_request_to_go_live', service_id=service_id)
|
||||
)|safe,
|
||||
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>
|
||||
|
||||
<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 %}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user