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. Built from https://develop.svn.wordpress.org/trunk@56008 git-svn-id: http://core.svn.wordpress.org/trunk@55520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -140,12 +140,14 @@ function display_setup_form( $error = null ) {
|
||||
<td>
|
||||
<div class="wp-pwd">
|
||||
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
|
||||
<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" />
|
||||
<div class="password-input-wrapper">
|
||||
<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" />
|
||||
<div id="pass-strength-result" aria-live="polite"></div>
|
||||
</div>
|
||||
<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' ); ?>">
|
||||
<span class="dashicons dashicons-hidden"></span>
|
||||
<span class="text"><?php _e( 'Hide' ); ?></span>
|
||||
</button>
|
||||
<div id="pass-strength-result" aria-live="polite"></div>
|
||||
</div>
|
||||
<p><span class="description important hide-if-no-js">
|
||||
<strong><?php _e( 'Important:' ); ?></strong>
|
||||
|
||||
Reference in New Issue
Block a user