Merge pull request #209 from alphagov/better-csv-guidance

Give users better guidance about CSV files
This commit is contained in:
Adam Shimali
2016-02-29 11:04:48 +00:00
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 %}