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:
@@ -223,33 +223,41 @@ switch ( $step ) {
|
||||
<table class="form-table" role="presentation">
|
||||
<tr>
|
||||
<th scope="row"><label for="dbname"><?php _e( 'Database Name' ); ?></label></th>
|
||||
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/></td>
|
||||
<td id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></td>
|
||||
<td><input name="dbname" id="dbname" type="text" aria-describedby="dbname-desc" size="25" placeholder="wordpress"<?php echo $autofocus; ?>/>
|
||||
<p id="dbname-desc"><?php _e( 'The name of the database you want to use with WordPress.' ); ?></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="uname"><?php _e( 'Username' ); ?></label></th>
|
||||
<td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" /></td>
|
||||
<td id="uname-desc"><?php _e( 'Your database username.' ); ?></td>
|
||||
<td><input name="uname" id="uname" type="text" aria-describedby="uname-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'username', 'example username' ), ENT_QUOTES ); ?>" />
|
||||
<p id="uname-desc"><?php _e( 'Your database username.' ); ?></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pwd"><?php _e( 'Password' ); ?></label></th>
|
||||
<td><input name="pwd" id="pwd" type="text" aria-describedby="pwd-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" spellcheck="false" /></td>
|
||||
<td id="pwd-desc"><?php _e( 'Your database password.' ); ?></td>
|
||||
<td>
|
||||
<div class="wp-pwd">
|
||||
<input name="pwd" id="pwd" type="password" class="regular-text" data-reveal="1" aria-describedby="pwd-desc" size="25" placeholder="<?php echo htmlspecialchars( _x( 'password', 'example password' ), ENT_QUOTES ); ?>" autocomplete="off" spellcheck="false" />
|
||||
<button type="button" class="button pwd-toggle hide-if-no-js" data-toggle="0" data-start-masked="1" aria-label="<?php esc_attr_e( 'Show password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility"></span>
|
||||
<span class="text"><?php _e( 'Show' ); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<p id="pwd-desc"><?php _e( 'Your database password.' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="dbhost"><?php _e( 'Database Host' ); ?></label></th>
|
||||
<td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" /></td>
|
||||
<td id="dbhost-desc">
|
||||
<td><input name="dbhost" id="dbhost" type="text" aria-describedby="dbhost-desc" size="25" value="localhost" />
|
||||
<p id="dbhost-desc">
|
||||
<?php
|
||||
/* translators: %s: localhost */
|
||||
printf( __( 'You should be able to get this info from your web host, if %s does not work.' ), '<code>localhost</code>' );
|
||||
?>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="prefix"><?php _e( 'Table Prefix' ); ?></label></th>
|
||||
<td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" /></td>
|
||||
<td id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
|
||||
<td><input name="prefix" id="prefix" type="text" aria-describedby="prefix-desc" value="wp_" size="25" />
|
||||
<p id="prefix-desc"><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
@@ -260,6 +268,7 @@ switch ( $step ) {
|
||||
<p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
|
||||
</form>
|
||||
<?php
|
||||
wp_print_scripts( 'password-toggle' );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
Reference in New Issue
Block a user