From be4f37f26baf8b9ade8cc794c27929ada5da383b Mon Sep 17 00:00:00 2001 From: Clinton Blackburn Date: Tue, 6 Oct 2015 16:54:52 -0400 Subject: [PATCH] Credit fixes - Fixed receipt page button - Fixed message on dashboard ECOM-2492 --- lms/static/js/commerce/views/receipt_view.js | 6 +++++- lms/templates/dashboard/_dashboard_credit_info.html | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lms/static/js/commerce/views/receipt_view.js b/lms/static/js/commerce/views/receipt_view.js index b583a39eab..5eeaa38487 100644 --- a/lms/static/js/commerce/views/receipt_view.js +++ b/lms/static/js/commerce/views/receipt_view.js @@ -288,7 +288,11 @@ function completeOrder(event) { // jshint ignore:line providerId = $(event).data("provider"), $errorContainer = $("#error-container"); - event.preventDefault(); + try { + event.preventDefault(); + } catch (err) { + // Ignore the error as not all event inputs have the preventDefault method. + } analytics.track( "edx.bi.credit.clicked_complete_credit", diff --git a/lms/templates/dashboard/_dashboard_credit_info.html b/lms/templates/dashboard/_dashboard_credit_info.html index bca86acee3..509c84c95b 100644 --- a/lms/templates/dashboard/_dashboard_credit_info.html +++ b/lms/templates/dashboard/_dashboard_credit_info.html @@ -23,8 +23,8 @@ % if not credit_status["purchased"] and not credit_status["error"] :

## Translators: provider_name is the name of a credit provider or university (e.g. State University) - ${_("You are now eligible to purchase course credit from {provider_name} for this course. Click Get Credit to get started.").format( - provider_name=credit_status["provider_name"], + ${_("You are now eligible to purchase course credit for this course. Click Get Credit to get started.").format( + provider_name=credit_status["provider_name"], )}