Prevent unintended password change after clicking "Generate Password" and then "Cancel" when editing a user profile.

Merges [33766] to the 4.3 branch.

Props peterwilsoncc.
Fixes #33419 for 4.3.1.
Built from https://develop.svn.wordpress.org/branches/4.3@33980


git-svn-id: http://core.svn.wordpress.org/branches/4.3@33949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-09-09 17:32:24 +00:00
parent 8c51f55fdd
commit 516ee5f231
2 changed files with 5 additions and 1 deletions

View File

@ -203,6 +203,10 @@
$generateButton.show(); $generateButton.show();
$passwordWrapper.hide(); $passwordWrapper.hide();
// Clear password field to prevent update
$pass1.val( '' ).trigger( 'pwupdate' );
$submitButtons.prop( 'disabled', false );
} ); } );
$pass1Row.closest('form').on( 'submit', function () { $pass1Row.closest('form').on( 'submit', function () {

File diff suppressed because one or more lines are too long