Give users better guidance about CSV files

This commit adds some guidance on the ‘Add recipients’ page about what should
be in the CSV file. The guidance is contextual to the template, and based on
the problems that we saw users having yesterday.
This commit is contained in:
Chris Hill-Scott
2016-02-26 16:22:07 +00:00
parent 1adb5e673c
commit 0cce5db3d1
2 changed files with 21 additions and 11 deletions

View File

@@ -15,3 +15,7 @@
margin-bottom: $gutter;
clear: both;
}
.bottom-gutter-2-3 {
margin-bottom: $gutter * 2/3;
}

View File

@@ -30,19 +30,25 @@
<div class="grid-row">
<div class="column-two-thirds">
{{ banner(
'You can upload real data, but well only send to your mobile number until you <a href="{}">request to go live</a>'.format(
url_for('.service_request_to_go_live', service_id=service_id)
)|safe,
'info'
)}}
<p>
Add recipients by uploading a .csv file with
{{ template.placeholders|length + 1 }}
{% if template.placeholders %}
columns:
{% else %}
column:
{% endif %}
</p>
<p class="bottom-gutter-2-3">
<span class='placeholder'>to</span>
{{ template.placeholders_as_markup|join(" ") }}
</p>
<p>
<a href="{{ url_for('.get_example_csv', service_id=service_id, template_id=template.id) }}">Download an example</a>
</p>
</div>
</div>
{{file_upload(form.file, button_text='Upload a CSV file')}}
<p>
<a href="{{ url_for('.get_example_csv', service_id=service_id, template_id=template.id) }}">Download an example CSV file</a>
</p>
{{file_upload(form.file, button_text='Upload your CSV file')}}
{% endblock %}