diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js index 386f8ae593..c34b9284d1 100644 --- a/src/js/_enqueues/admin/user-profile.js +++ b/src/js/_enqueues/admin/user-profile.js @@ -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(); } }