mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Login and Registration: Add required
to Username/password inputs.
Add the `required` attributes to username and password inputs for login. Props aznadesign, sanchothefat, alexstine, nant82, swissspidy, afercia, d-signed, joedolson. Fixes #32510. Built from https://develop.svn.wordpress.org/trunk@55953 git-svn-id: http://core.svn.wordpress.org/trunk@55465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
84d55e7e0f
commit
17749f1d23
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-alpha-55952';
|
||||
$wp_version = '6.3-alpha-55953';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
10
wp-login.php
10
wp-login.php
@ -842,7 +842,7 @@ switch ( $action ) {
|
||||
<form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post">
|
||||
<p>
|
||||
<label for="user_login"><?php _e( 'Username or Email Address' ); ?></label>
|
||||
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" autocomplete="username" />
|
||||
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" autocomplete="username" required="required" />
|
||||
</p>
|
||||
<?php
|
||||
|
||||
@ -1085,11 +1085,11 @@ switch ( $action ) {
|
||||
<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
|
||||
<p>
|
||||
<label for="user_login"><?php _e( 'Username' ); ?></label>
|
||||
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" autocomplete="username" />
|
||||
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" autocomplete="username" required="required" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="user_email"><?php _e( 'Email' ); ?></label>
|
||||
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" autocomplete="email" />
|
||||
<input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" autocomplete="email" required="required" />
|
||||
</p>
|
||||
<?php
|
||||
|
||||
@ -1425,13 +1425,13 @@ switch ( $action ) {
|
||||
<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
|
||||
<p>
|
||||
<label for="user_login"><?php _e( 'Username or Email Address' ); ?></label>
|
||||
<input type="text" name="log" id="user_login"<?php echo $aria_describedby; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" autocomplete="username" />
|
||||
<input type="text" name="log" id="user_login"<?php echo $aria_describedby; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" autocomplete="username" required="required" />
|
||||
</p>
|
||||
|
||||
<div class="user-pass-wrap">
|
||||
<label for="user_pass"><?php _e( 'Password' ); ?></label>
|
||||
<div class="wp-pwd">
|
||||
<input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby; ?> class="input password-input" value="" size="20" autocomplete="current-password" spellcheck="false" />
|
||||
<input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby; ?> class="input password-input" value="" size="20" autocomplete="current-password" spellcheck="false" required="required" />
|
||||
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Show password' ); ?>">
|
||||
<span class="dashicons dashicons-visibility" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user