WordPress.org

Make WordPress Core

Changeset 41556


Ignore:
Timestamp:
09/21/2017 09:28:07 PM (8 months ago)
Author:
adamsilverstein
Message:

Login: Password reset - add hide icon & confirm weak password checkbox.

Extends the password features added in 4.3 to the password reset flow.

Props johnbillion, manolis09, umesh.nevase, Nikschavan.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/login.css

    r41062 r41556  
    7272    margin: 0;
    7373    padding: 0;
     74}
     75
     76.login .password-input-wrapper {
     77    display: table;
     78}
     79
     80.login .input.password-input {
     81    display: table-cell;
     82    margin: 0;
     83}
     84
     85.login .pw-weak {
     86    margin-bottom: 15px;
     87}
     88
     89.login .button.button-secondary {
     90    display: table-cell;
     91    border-radius: 0;
     92    vertical-align: middle;
    7493}
    7594
  • trunk/src/wp-admin/js/user-profile.js

    r40657 r41556  
    162162        $('.user-pass2-wrap').hide();
    163163
    164         $submitButton = $( '#submit' ).on( 'click', function () {
     164        $submitButton = $( '#submit, #wp-submit' ).on( 'click', function () {
    165165            updateLock = false;
    166166        });
     
    315315        if ( passStrength.className ) {
    316316            $pass1.add( $pass1Text ).addClass( passStrength.className );
    317             if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
     317            if ( $( passStrength ).is( '.short, .bad' ) ) {
    318318                if ( ! $weakCheckbox.prop( 'checked' ) ) {
    319319                    $submitButtons.prop( 'disabled', true );
  • trunk/src/wp-login.php

    r41291 r41556  
    645645
    646646        <div class="wp-pwd">
    647             <span class="password-input-wrapper">
    648                 <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" aria-describedby="pass-strength-result" />
    649             </span>
     647            <div class="password-input-wrapper">
     648                <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" />
     649                <span class="button button-secondary wp-hide-pw hide-if-no-js">
     650                    <span class="dashicons dashicons-hidden"></span>
     651                </span>
     652            </div>
    650653            <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
     654        </div>
     655        <div class="pw-weak">
     656            <label>
     657                <input type="checkbox" name="pw_weak" class="pw-checkbox" />
     658                <?php _e( 'Confirm use of weak password' ); ?>
     659            </label>
    651660        </div>
    652661    </div>
Note: See TracChangeset for help on using the changeset viewer.