myaccount/form-reset-password.php

- Add names to nonces in template files
- Add autocomplete attributes to reset password form
- Use nbsp to separate * denoting required fields

Reference:
9d10d107e20e20b20719236bfbfd123f15667a3d
cef2b1ee131c3edbf4f22c8da6a5206ec39dcf87
80dc183880ba0ee3c95c85d8a91630e4f8fe1bc3
This commit is contained in:
Unknown 2018-06-05 20:28:18 -06:00
parent 05ab7ca736
commit 4d76d4d389
1 changed files with 8 additions and 11 deletions

View File

@ -11,14 +11,11 @@
* the readme will list any important changes. * the readme will list any important changes.
* *
* @see https://docs.woocommerce.com/document/template-structure/ * @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates * @package WooCommerce/Templates
* @version 3.3.0 * @version 3.4.0
*/ */
if ( ! defined( 'ABSPATH' ) ) { defined( 'ABSPATH' ) || exit;
exit;
}
wc_print_notices(); ?> wc_print_notices(); ?>
@ -27,12 +24,12 @@ wc_print_notices(); ?>
<p><?php echo apply_filters( 'woocommerce_reset_password_message', esc_html__( 'Enter a new password below.', 'understrap') ); ?></p><?php // @codingStandardsIgnoreLine ?> <p><?php echo apply_filters( 'woocommerce_reset_password_message', esc_html__( 'Enter a new password below.', 'understrap') ); ?></p><?php // @codingStandardsIgnoreLine ?>
<p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first"> <p class="woocommerce-form-row woocommerce-form-row--first form-row form-row-first">
<label for="password_1"><?php esc_html_e( 'New password', 'understrap' ); ?> <span class="required">*</span></label> <label for="password_1"><?php esc_html_e( 'New password', 'understrap' ); ?>&nbsp;<span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_1" id="password_1" /> <input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_1" id="password_1" autocomplete="new-password" />
</p> </p>
<p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last"> <p class="woocommerce-form-row woocommerce-form-row--last form-row form-row-last">
<label for="password_2"><?php esc_html_e( 'Re-enter new password', 'understrap' ); ?> <span class="required">*</span></label> <label for="password_2"><?php esc_html_e( 'Re-enter new password', 'understrap' ); ?>&nbsp;<span class="required">*</span></label>
<input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_2" id="password_2" /> <input type="password" class="woocommerce-Input woocommerce-Input--text input-text form-control" name="password_2" id="password_2" autocomplete="new-password" />
</p> </p>
<input type="hidden" name="reset_key" value="<?php echo esc_attr( $args['key'] ); ?>" /> <input type="hidden" name="reset_key" value="<?php echo esc_attr( $args['key'] ); ?>" />
@ -47,6 +44,6 @@ wc_print_notices(); ?>
<button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'understrap' ); ?>"><?php esc_html_e( 'Save', 'understrap' ); ?></button> <button type="submit" class="btn btn-outline-primary" value="<?php esc_attr_e( 'Save', 'understrap' ); ?>"><?php esc_html_e( 'Save', 'understrap' ); ?></button>
</p> </p>
<?php wp_nonce_field( 'reset_password' ); ?> <?php wp_nonce_field( 'reset_password', 'woocommerce-reset-password-nonce' ); ?>
</form> </form>