Toggle between dashicons-hidden and dashicons-visibility in the password hide/show button.
fixes #33135 git-svn-id: https://develop.svn.wordpress.org/trunk@33438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3ad35be856
commit
80c9c8cfca
@ -141,7 +141,7 @@ function display_setup_form( $error = null ) {
|
||||
<?php $initial_password = wp_generate_password( 24 ); ?>
|
||||
<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
|
||||
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility"></span>
|
||||
<span class="dashicons dashicons-hidden"></span>
|
||||
<span class="text"><?php _e( 'Hide' ); ?></span>
|
||||
</button>
|
||||
<div id="pass-strength-result" aria-live="polite"></div>
|
||||
|
@ -143,8 +143,8 @@
|
||||
if ( show == 1 ) {
|
||||
pwWrapper.addClass( 'show-password' );
|
||||
pw_togglebtn.attr({ 'data-toggle': 0, 'aria-label': userProfileL10n.ariaHide })
|
||||
.find( '.text' ).text( userProfileL10n.hide )
|
||||
;
|
||||
.find( '.text' ).text( userProfileL10n.hide );
|
||||
pw_togglebtn.find( '.dashicons' ).removeClass('dashicons-visibility').addClass('dashicons-hidden');
|
||||
pwFieldText.focus();
|
||||
if ( ! _.isUndefined( pwFieldText[0].setSelectionRange ) ) {
|
||||
pwFieldText[0].setSelectionRange( 0, 100 );
|
||||
@ -153,6 +153,7 @@
|
||||
pwWrapper.removeClass( 'show-password' );
|
||||
pw_togglebtn.attr({ 'data-toggle': 1, 'aria-label': userProfileL10n.ariaShow })
|
||||
.find( '.text' ).text( userProfileL10n.show );
|
||||
pw_togglebtn.find( '.dashicons' ).removeClass('dashicons-hidden').addClass('dashicons-visibility');
|
||||
pw_field.focus();
|
||||
if ( ! _.isUndefined( pw_field[0].setSelectionRange ) ) {
|
||||
pw_field[0].setSelectionRange( 0, 100 );
|
||||
|
@ -470,7 +470,7 @@ if ( $show_password_fields ) :
|
||||
<div class="wp-pwd hide-if-js">
|
||||
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
|
||||
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility"></span>
|
||||
<span class="dashicons dashicons-hidden"></span>
|
||||
<span class="text"><?php _e( 'Hide' ); ?></span>
|
||||
</button>
|
||||
<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
|
||||
|
@ -404,7 +404,7 @@ if ( apply_filters( 'show_password_fields', true ) ) : ?>
|
||||
<?php $initial_password = wp_generate_password( 24 ); ?>
|
||||
<input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
|
||||
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility"></span>
|
||||
<span class="dashicons dashicons-hidden"></span>
|
||||
<span class="text"><?php _e( 'Hide' ); ?></span>
|
||||
</button>
|
||||
<button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
|
||||
|
Loading…
Reference in New Issue
Block a user