From 52bdeee37d15d8c7f7515013fbcbb6d8bb35d9a6 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 21 Sep 2017 21:28:07 +0000 Subject: [PATCH] Login: Password reset - add hide icon & confirm weak password checkbox. Extends the password features added in 4.3 to the password reset flow. Props johnbillion, manolis09, umesh.nevase, Nikschavan. git-svn-id: https://develop.svn.wordpress.org/trunk@41556 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/login.css | 19 +++++++++++++++++++ src/wp-admin/js/user-profile.js | 4 ++-- src/wp-login.php | 15 ++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css index 23283235d7..5da174cadc 100644 --- a/src/wp-admin/css/login.css +++ b/src/wp-admin/css/login.css @@ -73,6 +73,25 @@ p { padding: 0; } +.login .password-input-wrapper { + display: table; +} + +.login .input.password-input { + display: table-cell; + margin: 0; +} + +.login .pw-weak { + margin-bottom: 15px; +} + +.login .button.button-secondary { + display: table-cell; + border-radius: 0; + vertical-align: middle; +} + .login form { margin-top: 20px; margin-left: 0; diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js index ca99584215..e95a42844e 100644 --- a/src/wp-admin/js/user-profile.js +++ b/src/wp-admin/js/user-profile.js @@ -161,7 +161,7 @@ // hide this $('.user-pass2-wrap').hide(); - $submitButton = $( '#submit' ).on( 'click', function () { + $submitButton = $( '#submit, #wp-submit' ).on( 'click', function () { updateLock = false; }); @@ -314,7 +314,7 @@ if ( passStrength.className ) { $pass1.add( $pass1Text ).addClass( passStrength.className ); - if ( 'short' === passStrength.className || 'bad' === passStrength.className ) { + if ( $( passStrength ).is( '.short, .bad' ) ) { if ( ! $weakCheckbox.prop( 'checked' ) ) { $submitButtons.prop( 'disabled', true ); } diff --git a/src/wp-login.php b/src/wp-login.php index 507a122af5..4670b171b3 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -644,11 +644,20 @@ case 'rp' :

- - - +
+ + + + +
+
+ +