Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.
Props adamsilverstein, wonderboymusic. Fixes #33450. Built from https://develop.svn.wordpress.org/trunk@34312 git-svn-id: http://core.svn.wordpress.org/trunk@34276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -217,6 +217,15 @@
|
||||
$cancelButton.on( 'click', function () {
|
||||
updateLock = false;
|
||||
|
||||
// Clear any entered password.
|
||||
$pass1Text.val( '' );
|
||||
|
||||
// Generate a new password.
|
||||
wp.ajax.post( 'generate-password' )
|
||||
.done( function( data ) {
|
||||
$pass1.data( 'pw', data );
|
||||
} );
|
||||
|
||||
$generateButton.show();
|
||||
$passwordWrapper.hide();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user