From 14e0a4a03855fe8e7ffeffd0d7f39a063f80c31e Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 12 Sep 2013 14:58:34 -0400 Subject: [PATCH 1/3] Show order errors in page instead of in an alert. --- lms/static/js/verify_student/photocapture.js | 6 +++++- lms/templates/verify_student/photo_verification.html | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lms/static/js/verify_student/photocapture.js b/lms/static/js/verify_student/photocapture.js index 47c6b653fb..5f39a6e55e 100644 --- a/lms/static/js/verify_student/photocapture.js +++ b/lms/static/js/verify_student/photocapture.js @@ -50,7 +50,11 @@ var submitToPaymentProcessing = function() { $("#pay_form").submit(); }) .fail(function(jqXhr,text_status, error_thrown) { - alert(jqXhr.responseText); + if(jqXhr.status == 400) { + $('#order-error .copy p').html(jqXhr.responseText); + } + $('#order-error').show(); + $("html, body").animate({ scrollTop: 0 }); }); } diff --git a/lms/templates/verify_student/photo_verification.html b/lms/templates/verify_student/photo_verification.html index bec59216be..71d18f1f39 100644 --- a/lms/templates/verify_student/photo_verification.html +++ b/lms/templates/verify_student/photo_verification.html @@ -38,6 +38,17 @@ +
From 0815bd48feb3d20dfeaf44a5612923bc7c1c4ece Mon Sep 17 00:00:00 2001 From: Frances Botsford Date: Fri, 13 Sep 2013 11:54:32 -0400 Subject: [PATCH 2/3] adjusted error wording on failed photo verification order --- lms/templates/verify_student/photo_verification.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/verify_student/photo_verification.html b/lms/templates/verify_student/photo_verification.html index 71d18f1f39..af66b77160 100644 --- a/lms/templates/verify_student/photo_verification.html +++ b/lms/templates/verify_student/photo_verification.html @@ -44,7 +44,7 @@

${_("Error processing your order")}

-

${_("We encountered an error trying to process your order. Please try again later.")}

+

${_("Oops! Something went wrong. Please confirm your details again and click the button to move on to payment. ")}

From bf1447624259f54502e13423331118db6e22c3a4 Mon Sep 17 00:00:00 2001 From: Frances Botsford Date: Fri, 13 Sep 2013 11:54:32 -0400 Subject: [PATCH 3/3] adjusted error wording on failed photo verification order --- lms/templates/verify_student/photo_verification.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/verify_student/photo_verification.html b/lms/templates/verify_student/photo_verification.html index af66b77160..49c7886e89 100644 --- a/lms/templates/verify_student/photo_verification.html +++ b/lms/templates/verify_student/photo_verification.html @@ -44,7 +44,7 @@

${_("Error processing your order")}

-

${_("Oops! Something went wrong. Please confirm your details again and click the button to move on to payment. ")}

+

${_("Oops! Something went wrong. Please confirm your details again and click the button to move on to payment. If you are still having trouble, please try again later.")}