rebase on oct-10-2023
This commit is contained in:
@@ -52,7 +52,9 @@
|
||||
$( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
|
||||
|
||||
// Focus the password field.
|
||||
$( $pass1 ).trigger( 'focus' );
|
||||
if ( 'mailserver_pass' !== $pass1.prop('id' ) ) {
|
||||
$( $pass1 ).trigger( 'focus' );
|
||||
}
|
||||
}
|
||||
|
||||
function bindPass1() {
|
||||
@@ -171,7 +173,7 @@
|
||||
var $generateButton,
|
||||
$cancelButton;
|
||||
|
||||
$pass1Row = $( '.user-pass1-wrap, .user-pass-wrap, .reset-pass-submit' );
|
||||
$pass1Row = $( '.user-pass1-wrap, .user-pass-wrap, .mailserver-pass-wrap, .reset-pass-submit' );
|
||||
|
||||
// Hide the confirm password field when JavaScript support is enabled.
|
||||
$('.user-pass2-wrap').hide();
|
||||
@@ -188,7 +190,7 @@
|
||||
$submitButtons.prop( 'disabled', ! $weakCheckbox.prop( 'checked' ) );
|
||||
} );
|
||||
|
||||
$pass1 = $('#pass1');
|
||||
$pass1 = $('#pass1, #mailserver_pass');
|
||||
if ( $pass1.length ) {
|
||||
bindPass1();
|
||||
} else {
|
||||
@@ -314,23 +316,27 @@
|
||||
}
|
||||
|
||||
function showOrHideWeakPasswordCheckbox() {
|
||||
var passStrength = $('#pass-strength-result')[0];
|
||||
var passStrengthResult = $('#pass-strength-result');
|
||||
|
||||
if ( passStrength.className ) {
|
||||
$pass1.addClass( passStrength.className );
|
||||
if ( $( passStrength ).is( '.short, .bad' ) ) {
|
||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
}
|
||||
$weakRow.show();
|
||||
} else {
|
||||
if ( $( passStrength ).is( '.empty' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
$weakCheckbox.prop( 'checked', false );
|
||||
if ( passStrengthResult.length ) {
|
||||
var passStrength = passStrengthResult[0];
|
||||
|
||||
if ( passStrength.className ) {
|
||||
$pass1.addClass( passStrength.className );
|
||||
if ( $( passStrength ).is( '.short, .bad' ) ) {
|
||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
}
|
||||
$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();
|
||||
}
|
||||
$weakRow.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user