From 592ab58f372eaf5e8af808088fc2c290df0d8e55 Mon Sep 17 00:00:00 2001 From: karlchillmaid Date: Wed, 18 Sep 2019 16:11:46 +0100 Subject: [PATCH] Update spreadsheet validation errors --- app/templates/views/check/column-errors.html | 70 +++++++++++--------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/app/templates/views/check/column-errors.html b/app/templates/views/check/column-errors.html index 50e68ea73..66dd8f7da 100644 --- a/app/templates/views/check/column-errors.html +++ b/app/templates/views/check/column-errors.html @@ -38,7 +38,7 @@ {% elif not count_of_recipients %}

- Your file is missing some rows + Your file is missing rows

{% if recipients.missing_column_headers %}

@@ -56,32 +56,38 @@ {% elif not recipients.has_recipient_columns %}

- Your file needs {{ ( - recipients.missing_column_headers - if template.template_type == 'letter' else required_recipient_columns - ) | formatted_list( - prefix='a column called', - prefix_plural='columns called' - ) }} + Your file is missing columns

-

- Right now it has {{ recipients.column_headers | formatted_list( - prefix='one column, called ', - prefix_plural='columns called ' - ) }}. -

+

+ It needs {{ ( + recipients.missing_column_headers + if template.template_type == 'letter' else required_recipient_columns + ) | formatted_list( + prefix='a column called', + prefix_plural='columns called' + ) }}. +

+

+ Right now it has {{ recipients.column_headers | formatted_list( + prefix='one column, called ', + prefix_plural='columns called ' + ) }}. +

{% elif recipients.duplicate_recipient_column_headers %}

- Your file has more than one column called {{ ( - recipients.duplicate_recipient_column_headers - ) | formatted_list( - conjunction='or', - prefix='', - prefix_plural='' - ) }} + Your file has duplicate columns

+

+ We found more than one column called {{ ( + recipients.duplicate_recipient_column_headers + ) | formatted_list( + conjunction='or', + prefix='', + prefix_plural='' + ) }}. +

Delete or rename one of these columns and try again.

@@ -89,16 +95,18 @@ {% elif recipients.missing_column_headers %}

- The columns in your file need to match the double brackets in - your template + Your file is missing columns

-

- Your file is missing {{ recipients.missing_column_headers | formatted_list( - conjunction='and', - prefix='a column called ', - prefix_plural='columns called ' - ) }}. -

+

+ The column names need to match the double brackets in your template. +

+

+ Your file is missing {{ recipients.missing_column_headers | formatted_list( + conjunction='and', + prefix='a column called ', + prefix_plural='columns called ' + ) }}. +

{% elif sent_previously %} @@ -141,7 +149,7 @@ {{ file_upload( form.file, action=url_for('.send_messages', service_id=current_service.id, template_id=template.id), - button_text='Re-upload your file' + button_text='Upload a new file' ) }} {% endif %}