Persist (and mask) the password on the install screen if the install does not proceed due to errors.

If you forget or enter an invalid username/e-mail, the password choosing shouldn't start over.

fixes #33162

git-svn-id: https://develop.svn.wordpress.org/trunk@33495 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2015-07-29 19:21:26 +00:00
parent 4149ad8845
commit 37aa0574c4
2 changed files with 13 additions and 8 deletions
+2 -2
View File
@@ -137,9 +137,9 @@ function display_setup_form( $error = null ) {
</th>
<td>
<div class="">
<?php $initial_password = wp_generate_password( 18 ); ?>
<?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="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' ); ?>">
<button type="button" class="button button-secondary 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>