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.

git-svn-id: https://develop.svn.wordpress.org/branches/4.3@33980 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-09-09 17:31:40 +00:00
parent 225d5ed8cf
commit b12dc9f330

View File

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