Login and Registration: reset password - ensure submit button disabled when field empty.
Fix an issue where the submit button was enabled with an empty password when the user previously checked "Confirm use of weak password" for a weak password, then cleared the password field. Props henry.wright. Fixes #47924. Built from https://develop.svn.wordpress.org/trunk@46103 git-svn-id: http://core.svn.wordpress.org/trunk@45915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7bbce99655
commit
a3eba2c201
|
@ -272,9 +272,9 @@
|
|||
function check_pass_strength() {
|
||||
var pass1 = $('#pass1').val(), strength;
|
||||
|
||||
$('#pass-strength-result').removeClass('short bad good strong');
|
||||
$('#pass-strength-result').removeClass('short bad good strong empty');
|
||||
if ( ! pass1 ) {
|
||||
$('#pass-strength-result').html( ' ' );
|
||||
$( '#pass-strength-result' ).addClass( 'empty' ).html( ' ' );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,12 @@
|
|||
}
|
||||
$weakRow.show();
|
||||
} else {
|
||||
$submitButtons.prop( 'disabled', false );
|
||||
if ( $( passStrength ).is( '.empty' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
$weakCheckbox.prop( 'checked', false );
|
||||
} else {
|
||||
$submitButtons.prop( 'disabled', false );
|
||||
}
|
||||
$weakRow.hide();
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-46102';
|
||||
$wp_version = '5.3-alpha-46103';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue