From ab8e5b82b6abc813895507e7c0472174cd852a41 Mon Sep 17 00:00:00 2001 From: tasawernawaz Date: Thu, 13 Oct 2016 16:33:26 +0500 Subject: [PATCH] Forgot Password - Verbiage Update ECOM-5684 --- common/test/acceptance/tests/lms/test_lms.py | 6 ++-- .../js/student_account/views/LoginView.js | 31 ++++++++++--------- .../student_account/login.underscore | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/common/test/acceptance/tests/lms/test_lms.py b/common/test/acceptance/tests/lms/test_lms.py index fe5a189808..344fb1dda3 100644 --- a/common/test/acceptance/tests/lms/test_lms.py +++ b/common/test/acceptance/tests/lms/test_lms.py @@ -81,7 +81,7 @@ class ForgotPasswordPageTest(UniqueCourseTest): self.reset_password_page.is_success_visible(".submission-success") # Expect that we're shown a success message - self.assertIn("Password Reset Email Sent", self.reset_password_page.get_success_message()) + self.assertIn("Check Your Email", self.reset_password_page.get_success_message()) @attr(shard=8) @@ -143,7 +143,7 @@ class LoginFromCombinedPageTest(UniqueCourseTest): self.login_page.visit().password_reset(email=email) # Expect that we're shown a success message - self.assertIn("Password Reset Email Sent", self.login_page.wait_for_success()) + self.assertIn("Check Your Email", self.login_page.wait_for_success()) def test_password_reset_no_user(self): # Navigate to the password reset form @@ -153,7 +153,7 @@ class LoginFromCombinedPageTest(UniqueCourseTest): self.login_page.password_reset(email="nobody@nowhere.com") # Expect that we're shown a success message - self.assertIn("Password Reset Email Sent", self.login_page.wait_for_success()) + self.assertIn("Check Your Email", self.login_page.wait_for_success()) def test_third_party_login(self): """ diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js index 05bbc2eca1..62895d3d0b 100644 --- a/lms/static/js/student_account/views/LoginView.js +++ b/lms/static/js/student_account/views/LoginView.js @@ -37,13 +37,6 @@ render: function(html) { var fields = html || ''; - this.successMessage = HtmlUtils.interpolateHtml( - // eslint-disable-next-line - gettext('We have sent an email message with password reset instructions to the email address you provided. If you do not receive this message, {anchorStart}contact technical support{anchorEnd}.'), { // eslint-disable-line max-len - anchorStart: HtmlUtils.HTML(''), - anchorEnd: HtmlUtils.HTML('') - } - ); $(this.el).html(_.template(this.tpl)({ // We pass the context object to the template so that @@ -93,16 +86,26 @@ }, resetEmail: function() { + var email = $('#password-reset-email').val(), + successMessage; this.element.hide(this.$errors); this.resetMessage = this.$resetSuccess.find('.message-copy'); + + successMessage = HtmlUtils.interpolateHtml( + gettext('{paragraphStart}You entered {boldStart}{email}{boldEnd}. If this email address is associated with an edX account, we will send a message with password reset instructions to this email address.{paragraphEnd}' + // eslint-disable-line max-len + '{paragraphStart}If you do not receive a password reset message, verify that you entered the correct email address, or check your spam folder.{paragraphEnd}' + // eslint-disable-line max-len + '{paragraphStart}If you need further assistance, {anchorStart}contact technical support{anchorEnd}.{paragraphEnd}'), { // eslint-disable-line max-len + boldStart: HtmlUtils.HTML(''), + boldEnd: HtmlUtils.HTML(''), + paragraphStart: HtmlUtils.HTML('

'), + paragraphEnd: HtmlUtils.HTML('

'), + email: email, + anchorStart: HtmlUtils.HTML(''), + anchorEnd: HtmlUtils.HTML('') + }); + if (this.resetMessage.find('p').length === 0) { - this.resetMessage.append( - HtmlUtils.joinHtml( - HtmlUtils.HTML('

'), - this.successMessage, - HtmlUtils.HTML('

') - ).toString() - ); + this.resetMessage.append(HtmlUtils.joinHtml(successMessage).toString()); } this.element.show(this.$resetSuccess); }, diff --git a/lms/templates/student_account/login.underscore b/lms/templates/student_account/login.underscore index af7615f5d7..66f8123230 100644 --- a/lms/templates/student_account/login.underscore +++ b/lms/templates/student_account/login.underscore @@ -8,7 +8,7 @@