From 25e701553704065a52bdd64d842c4597cbe079a2 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 28 Jul 2017 09:09:22 +0100 Subject: [PATCH] Remove stuff about test jobs on row errors page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The send yourself a test flow doesn’t reference any kind of file/rows/table in the front end any more, and doesn’t create a CSV in the background (except for letters). And it should validate any mistakes before getting to the check page. So any user doing a send yourself a test flow should never get to this template, which means we can remove some redundant code. --- app/templates/views/check/row-errors.html | 76 ++++++++++------------- 1 file changed, 34 insertions(+), 42 deletions(-) diff --git a/app/templates/views/check/row-errors.html b/app/templates/views/check/row-errors.html index 0a3dc6dd9..91af69965 100644 --- a/app/templates/views/check/row-errors.html +++ b/app/templates/views/check/row-errors.html @@ -46,52 +46,44 @@
- {% if request.args.from_test %} - Back - {% else %} - {{file_upload(form.file, button_text='Re-upload your file')}} - {% endif %} + {{ file_upload(form.file, button_text='Re-upload your file') }}
- {% if not request.args.from_test %} +

{{ original_file_name }}

-

{{ original_file_name }}

- - {% call(item, row_number) list_table( - recipients.initial_annotated_rows_with_errors if row_errors and not recipients.missing_column_headers else recipients.initial_annotated_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['columns'][column].error and not recipients.missing_column_headers %} - {% call field() %} - - {{ item['columns'][column].error }} - {{ item['columns'][column].data if item['columns'][column].data != None }} - - {% endcall %} - {% elif item['columns'][column].ignore %} - {{ text_field(item['columns'][column].data or '', status='default') }} - {% else %} - {{ text_field(item['columns'][column].data or '') }} - {% endif %} - {% endfor %} - {% if item['columns'].get(None) %} - {% for column in item['columns'][None].data %} - {{ text_field(column, status='default') }} - {% endfor %} - {% endif %} + {% call(item, row_number) list_table( + recipients.initial_annotated_rows_with_errors if row_errors and not recipients.missing_column_headers else recipients.initial_annotated_rows, + caption=original_file_name, + caption_visible=False, + field_headings=[ + 'Row in file'|safe + ] + recipients.column_headers + ) %} + {% call index_field() %} + + {{ item.index + 2 }} + {% endcall %} - - {% endif %} + {% for column in recipients.column_headers %} + {% if item['columns'][column].error and not recipients.missing_column_headers %} + {% call field() %} + + {{ item['columns'][column].error }} + {{ item['columns'][column].data if item['columns'][column].data != None }} + + {% endcall %} + {% elif item['columns'][column].ignore %} + {{ text_field(item['columns'][column].data or '', status='default') }} + {% else %} + {{ text_field(item['columns'][column].data or '') }} + {% endif %} + {% endfor %} + {% if item['columns'].get(None) %} + {% for column in item['columns'][None].data %} + {{ text_field(column, status='default') }} + {% endfor %} + {% endif %} + {% endcall %} {% if count_of_displayed_recipients < count_of_recipients %}