WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/02/2021 06:11:26 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Login and Registration: Improve the UX of the Reset Password screen.

Previously, it was unclear that the displayed password is only being suggested and should be saved by clicking the Reset Password button.

This adds separate Generate Password and Save Password buttons, for clarity.

Props xkon, estelaris, jaymanpandya, hedgefield, audrasjb, erichmond, magicroundabout, lukecavanagh, knutsp, tinodidriksen, nico_martin, markhowellsmead, kara.mcnair, e_baker, pixelverbieger, souri_wpaustria, megabyterose, poena, whyisjake.
Fixes #39638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r50129 r50153  
    853853        wp_enqueue_script( 'user-profile' );
    854854
    855         login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password below.' ) . '</p>', $errors );
     855        login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password below or generate one.' ) . '</p>', $errors );
    856856
    857857        ?>
     
    899899            ?>
    900900            <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
    901             <p class="submit">
    902                 <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" />
     901            <p class="submit reset-pass-submit">
     902                <button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="true"><?php _e( 'Generate Password' ); ?></button>
     903                <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Save Password' ); ?>" />
    903904            </p>
    904905        </form>
Note: See TracChangeset for help on using the changeset viewer.