From a32ee429a391f9735365cd0fe8037c48033f7521 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Wed, 16 Mar 2016 11:19:01 -0400 Subject: [PATCH] Revert "Fixed the other half of forgot password flow accourding to logistration." This reverts commit 178f5a6056e39fc5bae2019ab78015ca006d466e. --- .../student_account/test/test_views.py | 4 +- .../js/student_account/password_reset.js | 15 -- lms/templates/main_django.html | 2 + .../registration/password_reset_complete.html | 59 ++++-- .../registration/password_reset_confirm.html | 184 +++++++++++++----- 5 files changed, 174 insertions(+), 90 deletions(-) delete mode 100644 lms/static/js/student_account/password_reset.js diff --git a/lms/djangoapps/student_account/test/test_views.py b/lms/djangoapps/student_account/test/test_views.py index 585233cb93..43229700d6 100644 --- a/lms/djangoapps/student_account/test/test_views.py +++ b/lms/djangoapps/student_account/test/test_views.py @@ -100,7 +100,7 @@ class StudentAccountUpdateTest(UrlResetMixin, TestCase): follow=True ) self.assertEqual(response.status_code, 200) - self.assertContains(response, "Your password has been reset.") + self.assertContains(response, "Your password has been set.") # Log the user out to clear session data self.client.logout() @@ -116,7 +116,7 @@ class StudentAccountUpdateTest(UrlResetMixin, TestCase): follow=True ) self.assertEqual(response.status_code, 200) - self.assertContains(response, "This password reset link is invalid. It may have been used already.") + self.assertContains(response, "The password reset link was invalid, possibly because the link has already been used.") self.client.logout() diff --git a/lms/static/js/student_account/password_reset.js b/lms/static/js/student_account/password_reset.js deleted file mode 100644 index 9733909315..0000000000 --- a/lms/static/js/student_account/password_reset.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Password reset template JS. - */ -$(function() { - 'use strict'; - // adding js class for styling with accessibility in mind - $("body").addClass("js"); - - // form field label styling on focus - $("form :input").focus(function() { - $("label[for='" + this.id + "']").parent().addClass("is-focused"); - }).blur(function() { - $("label").parent().removeClass("is-focused"); - }); -}); diff --git a/lms/templates/main_django.html b/lms/templates/main_django.html index 59c5e22078..89eb7f80c0 100644 --- a/lms/templates/main_django.html +++ b/lms/templates/main_django.html @@ -10,6 +10,8 @@ {% stylesheet 'style-vendor' %} {% stylesheet 'style-main' %} + {% stylesheet 'style-course-vendor' %} + {% stylesheet 'style-course' %} {% block main_vendor_js %} {% javascript 'main_vendor' %} diff --git a/lms/templates/registration/password_reset_complete.html b/lms/templates/registration/password_reset_complete.html index a5172e364c..908f2d610f 100644 --- a/lms/templates/registration/password_reset_complete.html +++ b/lms/templates/registration/password_reset_complete.html @@ -6,30 +6,49 @@ {% endblock %} {% block bodyextra %} - + {% endblock %} {% block bodyclass %}view-passwordreset{% endblock %} {% block body %} -
-
- +
+
+

+ + {% trans "Your Password Reset is Complete" %} + +

+
+
+ +
+ {% block content %} +
+ {% blocktrans with link_start='' link_end='' %} + Your password has been set. You may go ahead and {{ link_start }}log in{{ link_end }} now. + {% endblocktrans %}
-
+ {% endblock %} + {% endblock %} diff --git a/lms/templates/registration/password_reset_confirm.html b/lms/templates/registration/password_reset_confirm.html index d9549fa039..12daddac3a 100644 --- a/lms/templates/registration/password_reset_confirm.html +++ b/lms/templates/registration/password_reset_confirm.html @@ -3,70 +3,148 @@ {% block title %} -{% blocktrans with platform_name=platform_name %} - Reset Your {{ platform_name }} Password -{% endblocktrans %} + {% blocktrans with platform_name=platform_name %} + Reset Your {{ platform_name }} Password + {% endblocktrans %} {% endblock %} {% block bodyextra %} - + {% endblock %} {% block bodyclass %}view-passwordreset{% endblock %} {% block body %} -
-
- + + +
{% endblock %}