From 82233340b63b524785cb2d2c19af10fd4c815be0 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 20 Jul 2017 11:28:26 +0100 Subject: [PATCH] Track errors when uploading spreadsheets Uses the new javascript event tracking stuff so that we can see what errors people are getting when they upload spreadsheets. --- app/assets/javascripts/errorTracking.js | 2 +- app/templates/partials/check/not-allowed-to-send-to.html | 2 +- app/templates/partials/check/too-many-messages.html | 2 +- app/templates/views/check/column-errors.html | 8 ++++---- app/templates/views/check/row-errors.html | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/errorTracking.js b/app/assets/javascripts/errorTracking.js index 815643b73..3b7053841 100644 --- a/app/assets/javascripts/errorTracking.js +++ b/app/assets/javascripts/errorTracking.js @@ -1,7 +1,7 @@ (function(Modules) { "use strict"; - Modules.TrackEvent = function() { + Modules.TrackError = function() { this.start = function(component) { diff --git a/app/templates/partials/check/not-allowed-to-send-to.html b/app/templates/partials/check/not-allowed-to-send-to.html index 5b1537ac2..4d445e9c6 100644 --- a/app/templates/partials/check/not-allowed-to-send-to.html +++ b/app/templates/partials/check/not-allowed-to-send-to.html @@ -1,4 +1,4 @@ -

+

You can’t send to {{ 'this' if count_of_recipients == 1 else 'these' }} {{ template_type_label }} diff --git a/app/templates/partials/check/too-many-messages.html b/app/templates/partials/check/too-many-messages.html index 1f42c87f1..fd16b0534 100644 --- a/app/templates/partials/check/too-many-messages.html +++ b/app/templates/partials/check/too-many-messages.html @@ -1,4 +1,4 @@ -

+

{% if original_file_name %} Too many recipients {% else %} diff --git a/app/templates/views/check/column-errors.html b/app/templates/views/check/column-errors.html index 0dc1dffa4..f8407792f 100644 --- a/app/templates/views/check/column-errors.html +++ b/app/templates/views/check/column-errors.html @@ -24,7 +24,7 @@ {% if recipients.too_many_rows %} -

+

Your file has too many rows

@@ -35,7 +35,7 @@ {% elif not count_of_recipients %} -

+

Your file is missing some rows

@@ -47,7 +47,7 @@ {% elif not recipients.has_recipient_columns %} -

+

Your file needs {{ recipients.recipient_column_headers | formatted_list( prefix='a column called', prefix_plural='columns called' @@ -62,7 +62,7 @@ {% elif recipients.missing_column_headers %} -

+

The columns in your file need to match the double brackets in your template

diff --git a/app/templates/views/check/row-errors.html b/app/templates/views/check/row-errors.html index 3fdf0171d..ce470bcd8 100644 --- a/app/templates/views/check/row-errors.html +++ b/app/templates/views/check/row-errors.html @@ -22,7 +22,7 @@
{% call banner_wrapper(type='dangerous') %} {% if row_errors|length == 1 %} -

+

There is a problem with your data