{% extends "withnav_template.html" %} {% from "components/banner.html" import banner_wrapper %} {% from "components/radios.html" import radio_select %} {% from "components/table.html" import list_table, field, text_field, index_field, hidden_field_heading %} {% from "components/file-upload.html" import file_upload %} {% from "components/page-footer.html" import page_footer %} {% from "components/message-count-label.html" import message_count_label %} {% set file_contents_header_id = 'file-preview' %} {% macro skip_to_file_contents() %}

Skip to file contents

{% endmacro %} {% block service_page_title %} Error {% endblock %} {% block maincolumn_content %}
{% call banner_wrapper(type='dangerous') %} {% if row_errors|length == 1 %}

There is a problem with {{ original_file_name }}

You need to {{ row_errors[0] }}

{% else %}

There are some problems with {{ original_file_name }}

You need to:

{% endif %} {{ skip_to_file_contents() }} {% endcall %}
{{ file_upload( form.file, action=url_for('.send_messages', service_id=current_service.id, template_id=template.id), button_text='Re-upload your file' ) }}
Back to top
{% call(item, row_number) list_table( recipients.displayed_rows, caption=original_file_name, caption_visible=False, field_headings=[ 'Row in file'|safe ] + recipients.column_headers ) %} {% call index_field() %} {{ item.index + 2 }} {% endcall %} {% for column in recipients.column_headers %} {% if item[column].error and not recipients.missing_column_headers %} {% call field() %} {{ item[column].error }} {{ item[column].data if item[column].data != None }} {% endcall %} {% elif item[column].ignore %} {{ text_field(item[column].data or '', status='default') }} {% else %} {{ text_field(item[column].data or '') }} {% endif %} {% endfor %} {% if item[None].data %} {% for column in item[None].data %} {{ text_field(column, status='default') }} {% endfor %} {% endif %} {% endcall %}
{% if count_of_displayed_recipients < count_of_recipients %} {% elif row_errors and not recipients.missing_column_headers %} {% endif %} {% endblock %}