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

props peterwilsoncc.
fixes #33419 for trunk.
Built from https://develop.svn.wordpress.org/trunk@33766


git-svn-id: http://core.svn.wordpress.org/trunk@33734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-08-27 00:11:21 +00:00
parent 0db421e69b
commit be59078ef8
3 changed files with 6 additions and 2 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

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-33765'; $wp_version = '4.4-alpha-33766';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.