diff --git a/app/templates/views/check/ok.html b/app/templates/views/check/ok.html
index ebb207edd..c09b73756 100644
--- a/app/templates/views/check/ok.html
+++ b/app/templates/views/check/ok.html
@@ -14,141 +14,19 @@
{% endmacro %}
{% block service_page_title %}
- {{ "Error" if errors else "Preview of {}".format(template.name) }}
+ {{ "Preview of {}".format(template.name) }}
{% endblock %}
{% block maincolumn_content %}
- {% if recipients.too_many_rows %}
+
+ Preview of {{ template.name }}
+
+ {{ skip_to_file_contents() }}
-
- {% call banner_wrapper(type='dangerous') %}
-
- Your file has too many rows
-
-
- Notify can process up to
- {{ "{:,}".format(recipients.max_rows) }} rows at once. Your
- file has {{ "{:,}".format(recipients|length) }} rows.
-
- {{ skip_to_file_contents() }}
- {% endcall %}
-
-
- {% elif not count_of_recipients %}
-
-
- {% call banner_wrapper(type='dangerous') %}
-
- Your file is missing some rows
-
-
- It needs at least one row of data, and {{ recipients.missing_column_headers | sort() | formatted_list(
- prefix='a column called',
- prefix_plural='columns called'
- ) }}.
-
- {{ skip_to_file_contents() }}
- {% endcall %}
-
-
- {% elif not recipients.has_recipient_columns %}
-
-
- {% call banner_wrapper(type='dangerous') %}
-
- Your file needs {{ recipients.recipient_column_headers | 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 '
- ) }}.
-
- {{ skip_to_file_contents() }}
- {% endcall %}
-
-
- {% elif recipients.missing_column_headers %}
-
-
- {% call banner_wrapper(type='dangerous') %}
-
- The columns in your file 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 '
- ) }}.
-
- {{ skip_to_file_contents() }}
- {% endcall %}
-
-
- {% elif row_errors %}
-
-
- {% call banner_wrapper(type='dangerous') %}
- {% if row_errors|length == 1 %}
-
- There is a problem with your data
-
-
- You need to {{ row_errors[0] }}
-
- {% else %}
-
- There are some problems with your data
-
-
- You need to:
-
-
- {% for error in row_errors %}
- - {{ error }}
- {% endfor %}
-
- {% endif %}
- {{ skip_to_file_contents() }}
- {% endcall %}
-
-
- {% elif not recipients.allowed_to_send_to %}
- {% with
- count_of_recipients=count_of_recipients,
- template_type_label=recipients.recipient_column_headers[0]
- %}
- {% include "partials/check/not-allowed-to-send-to.html" %}
- {% endwith %}
- {% elif recipients.more_rows_than_can_send %}
- {% include "partials/check/too-many-messages.html" %}
- {% else %}
-
-
- Preview of {{ template.name }}
-
- {{ skip_to_file_contents() }}
-
- {% endif %}
-
- {% if not errors %}
- {{ template|string }}
- {% endif %}
+ {{ template|string }}
- {% if errors %}
- {% if request.args.from_test %}
-
- {% else %}
- {{file_upload(form.file, button_text='Re-upload your file')}}
- {% endif %}
- {% else %}
- {% endif %}
{% if not request.args.from_test %}
@@ -186,14 +63,7 @@
{% 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 %}
+ {% if item['columns'][column].ignore %}
{{ text_field(item['columns'][column].data or '', status='default') }}
{% else %}
{{ text_field(item['columns'][column].data or '') }}
@@ -208,12 +78,7 @@
{% endif %}
-
- {% if recipients.too_many_rows %}
-
- Can’t show the contents of this file
-
- {% elif count_of_displayed_recipients < count_of_recipients %}
+ {% if count_of_displayed_recipients < count_of_recipients %}
{% if row_errors and not recipients.missing_column_headers %}
Only showing the first {{ count_of_displayed_recipients }} rows with errors
@@ -221,15 +86,6 @@
Only showing the first {{ count_of_displayed_recipients }} rows
{% endif %}
- {% elif row_errors and not recipients.missing_column_headers %}
-
- Only showing rows with errors
-
- {% endif %}
-
- {% if errors %}
- Preview of {{ template.name }}
- {{ template|string }}
{% endif %}
{% endblock %}