From 774cf7f0d3bfcf5d53b0452615e0f879f0d1f4c6 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Mon, 16 Nov 2015 20:48:51 +0000 Subject: [PATCH] Passwords: Only disable hidden password fields if they are really hidden. Makes the password field on install and for password resets editable again. Both fields were accidentally set to disabled in [35603]. Props adamsilverstein, flixos90. Fixes #33699. git-svn-id: https://develop.svn.wordpress.org/trunk@35649 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/user-profile.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js index f98853c3df..fa269d8938 100644 --- a/src/wp-admin/js/user-profile.js +++ b/src/wp-admin/js/user-profile.js @@ -195,10 +195,12 @@ } } ); - // Disable the hidden inputs to prevent autofill and submission. - $pass1.prop( 'disabled', true ); - $pass2.prop( 'disabled', true ); - $pass1Text.prop( 'disabled', true ); + // Disable hidden inputs to prevent autofill and submission. + if ( $pass1.is( ':hidden' ) ) { + $pass1.prop( 'disabled', true ); + $pass2.prop( 'disabled', true ); + $pass1Text.prop( 'disabled', true ); + } $passwordWrapper = $pass1Row.find( '.wp-pwd' ); $generateButton = $pass1Row.find( 'button.wp-generate-pw' );