Make WordPress Core


Ignore:
Timestamp:
06/23/2023 11:07:10 PM (13 months ago)
Author:
joedolson
Message:

Upgrade/Install: Show/hide toggle on password fields.

Add a show/hide toggle for new passwords in initial user creation and database access during install and setup process using the same model as on user profiles. Add a new password toggle script. Change setup config table to two columns, matching the install table layout.

Props xmarcos, matt, markjaquith, nazgul, akbigdog, intoxination, rob1n, MichaelH, empireoflight, rmccue, markoheijnen, r0uter, amansurov, bi0xid, DrewAPicture, Narthur, wpnook, markparnell, costdev, clorith, ryokuhi, sabernhardt, bgoewert, ironprogrammer, adeltahri, joedolson, mukesh27, audrasjb, sergeybiryukov.
Fixes #3534.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r55933 r56008  
    141141                <div class="wp-pwd">
    142142                    <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
    143                     <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
     143                    <div class="password-input-wrapper">
     144                        <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
     145                        <div id="pass-strength-result" aria-live="polite"></div>
     146                    </div>
    144147                    <button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
    145148                        <span class="dashicons dashicons-hidden"></span>
    146149                        <span class="text"><?php _e( 'Hide' ); ?></span>
    147150                    </button>
    148                     <div id="pass-strength-result" aria-live="polite"></div>
    149151                </div>
    150152                <p><span class="description important hide-if-no-js">
Note: See TracChangeset for help on using the changeset viewer.