Do not re-generate the password after pressing "cancel". Persist the state.

Also removes pass2 code not needed since we're generating from one field.

fixes #33164
Built from https://develop.svn.wordpress.org/trunk@33475


git-svn-id: http://core.svn.wordpress.org/trunk@33442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2015-07-29 04:30:24 +00:00
parent 69107095b7
commit bca4465edf
3 changed files with 7 additions and 5 deletions

View File

@ -178,7 +178,9 @@
$generateButton.hide();
$passwordWrapper.show();
generatePassword();
if ( $pass1Text.val().length === 0 ) {
generatePassword();
}
_.defer( function() {
$pass1Text.focus();
@ -205,7 +207,7 @@
}
function check_pass_strength() {
var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength;
var pass1 = $('#pass1').val(), strength;
$('#pass-strength-result').removeClass('short bad good strong');
if ( ! pass1 ) {
@ -213,7 +215,7 @@
return;
}
strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass2 );
strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass1 );
switch ( strength ) {
case 2:

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta4-33474';
$wp_version = '4.3-beta4-33475';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.