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. git-svn-id: https://develop.svn.wordpress.org/trunk@46103 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
50a0d6c7a9
commit
96b4b1a70d
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user