2015-12-14 16:53:07 +00:00
{% extends "withnav_template.html" %}
2019-04-29 11:44:05 +01:00
{% from "components/page-header.html" import page_header %}
2016-01-07 20:11:22 +00:00
{% from "components/page-footer.html" import page_footer %}
2016-02-03 13:00:26 +00:00
{% from "components/file-upload.html" import file_upload %}
2016-04-05 11:16:29 +01:00
{% from "components/table.html" import list_table, text_field, index_field, index_field_heading %}
2023-08-30 11:07:38 -04:00
{% from "components/components/back-link/macro.njk" import usaBackLink %}
2024-08-26 09:02:39 -07:00
< script type = "text/javascript" src = "{{ asset_url('js/setTimezone.js') }}" > < / script >
2015-11-30 14:17:54 +00:00
2017-02-13 10:45:15 +00:00
{% block service_page_title %}
2021-01-06 13:02:09 +00:00
Upload a list of {{ 999|recipient_count_label(template.template_type) }}
2015-11-30 14:17:54 +00:00
{% endblock %}
2021-07-30 18:23:12 +01:00
{% block backLink %}
2023-08-30 11:07:38 -04:00
{{ usaBackLink({ "href": url_for('main.send_one_off', service_id=current_service.id, template_id=template.id) }) }}
2021-07-30 18:23:12 +01:00
{% endblock %}
2015-12-14 16:53:07 +00:00
{% block maincolumn_content %}
2016-02-03 14:43:16 +00:00
2021-07-30 18:23:12 +01:00
{{ page_header('Upload a list of {}'.format(999|recipient_count_label(template.template_type))) }}
2016-04-18 11:10:47 +01:00
2016-05-05 08:39:36 +01:00
< div class = "page-footer bottom-gutter" >
{{file_upload(
form.file,
2020-12-17 10:47:52 +00:00
allowed_file_extensions=allowed_file_extensions,
2021-12-03 18:14:02 +00:00
button_text='Choose a file',
show_errors=False
2016-05-05 08:39:36 +01:00
)}}
2016-04-18 11:10:47 +01:00
< / div >
2016-02-25 16:37:39 +00:00
2023-06-06 15:28:24 -04:00
< h2 class = "font-body-lg" > Your file needs to look like this example< / h2 >
2017-05-11 12:19:38 +01:00
< p class = "hint" >
Save your file as a
< acronym title = "Comma Separated Values" > CSV< / acronym > ,
< acronym title = "Tab Separated Values" > TSV< / acronym > ,
< acronym title = "Open Document Spreadsheet" > ODS< / acronym > ,
or Microsoft Excel spreadsheet
< / p >
2018-11-01 15:31:14 +00:00
< div class = "spreadsheet" data-module = "fullscreen-table" >
2016-07-01 07:08:55 +01:00
{% call(item, row_number) list_table(
example,
caption="Example",
caption_visible=False,
field_headings=[''] + column_headings
) %}
{{ index_field(row_number - 1) }}
{% for column in item %}
{{ text_field(column) }}
{% endfor %}
{% endcall %}
< / div >
< p class = "table-show-more-link" >
2023-06-08 13:12:00 -04:00
< a class = "usa-link" href = "{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}" download > Download this example (< abbr title = "Comma separated values" > CSV< / abbr > )< / a >
2016-07-01 07:08:55 +01:00
< / p >
2016-04-01 15:36:35 +01:00
2023-09-15 12:26:31 -04:00
< h2 class = "font-body-lg margin-bottom-1" > Your file will populate this template:< br > < span class = "font-body-lg" > ({{ template.name }})< / span > < / h2 >
2017-05-11 12:20:26 +01:00
{{ template|string }}
2016-04-05 11:20:52 +01:00
{% endblock %}