Updates to send and check SMS pages

Adds a back button instead of a back link (more prominent, you’re likely to
go back on these pages if you’ve made a mistake)

Tweaks to wording
This commit is contained in:
Chris Hill-Scott
2016-02-03 15:24:50 +00:00
parent 856296df5d
commit 4280c21b23
6 changed files with 23 additions and 25 deletions

View File

@@ -10,6 +10,7 @@
margin: $gutter-half 0 $gutter 0;
text-align: left;
position: relative;
clear: both;
}

View File

@@ -3,8 +3,10 @@
margin-bottom: 50px;
&-back-link {
display: block;
margin-top: $gutter;
@include button($grey-1);
display: inline-block;
padding: 0.52632em 0.78947em 0.26316em 0.78947em;
margin-left: 10px;
}
&-delete-link {

View File

@@ -217,7 +217,7 @@ class ChangePasswordForm(Form):
class CsvUploadForm(Form):
file = FileField('Upload a CSV file to add your recipients details', validators=[DataRequired(
file = FileField('Add your recipients by uploading a CSV file', validators=[DataRequired(
message='Please pick a file'), CsvFileValidator()])

View File

@@ -28,6 +28,7 @@
<form method="POST" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button" value="{{ "Send {} text message{}".format(upload_result.valid|count, '' if upload_result.valid|count == 1 else 's') }}" />
<a href="{{url_for('.send_sms', service_id=service_id, template_id=template_id)}}" class="page-footer-back-link">Back</a>
</form>
{% call(item) list_table(

View File

@@ -11,7 +11,7 @@
{% block maincolumn_content %}
<h1 class="heading-large">
Sent text messages
{{ uploaded_file_name }}
</h1>
{{ sms_message(
@@ -30,31 +30,35 @@
</li>
<li class="column-one-quarter">
{{ big_number(
counts.total,
'text message' if 1 == counts.total else 'text messages'
0, 'sent'
)}}
</li>
<li class="column-one-third">
<li class="column-one-quarter">
{{ big_number(
counts.failed,
'failed'
)}}
</li>
<li class="column-one-third">
<li class="column-one-quarter">
{{ big_number(
cost, 'total cost'
)}}
</li>
</ul>
{{ sms_message(
'Your application has been received. Register online at www.gov.uk/register-to-vote',
)}}
{% call(item) list_table(
messages,
caption=uploaded_file_name,
caption_visible=False,
empty_message="Messages go here",
field_headings=[
'To',
'Message',
right_aligned_field_heading('Delivery status')
right_aligned_field_heading('Status')
]
) %}
{% call field() %}

View File

@@ -15,15 +15,11 @@
{{ sms_message(template.content) }}
{{ banner(
'You can only send notifications to yourself',
subhead='Trial mode',
type='info'
) }}
{{file_upload(form.file)}}
{{ sms_message(
template.content, name='Preview'
) }}
<p>
<a href="#">Download an example CSV file</a>
</p>
{{ banner(
'You can only send messages to yourself until you <a href="{}">request to go live</a>'.format(
@@ -32,16 +28,10 @@
type='info'
) }}
{{file_upload(form.file)}}
<p>
<a href="#">Download an example CSV</a> to test with.
</p>
{{ page_footer(
"Continue",
"Continue to preview",
back_link=url_for(".choose_sms_template", service_id=service_id),
back_link_text="Back to templates"
back_link_text="Back"
) }}
</form>