Make WordPress Core

Ticket #33167: 33167.3.diff

File 33167.3.diff, 3.3 KB (added by umesh.nevase, 9 years ago)

refreshed patch with 'hide/show' toggle button stylling

  • home/umesh/Wordpress-core/trunk/wp-login.php

     
    661661                        <span class="password-input-wrapper">
    662662                                <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" />
    663663                        </span>
     664                        <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
     665                                                <span class="dashicons dashicons-hidden"></span>
     666                                                <span class="text"><?php _e( 'Hide' ); ?></span>
     667                                        </button>
    664668                        <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
    665669                </div>
    666670        </div>
     
    670674                <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
    671675        </p>
    672676
     677        <div class="pw-weak">           
     678                <label>
     679                        <input type="checkbox" name="pw_weak" class="pw-checkbox" />
     680                        <?php _e( 'Confirm use of weak password' ); ?>
     681                </label>               
     682        </div>
     683
    673684        <p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
    674685        <br class="clear" />
    675686
  • home/umesh/Wordpress-core/trunk/wp-admin/css/login.css

     
    206206        font-family: sans-serif;
    207207}
    208208
    209 .login-action-rp input[type="text"] {
     209.login-action-rp input[type="text"],
     210.login-action-rp input[type="password"] {
    210211        -webkit-box-shadow: none;
    211212        box-shadow: none;
    212213        margin: 0;
    213214}
    214215
     216.login-action-rp .wp-pwd .input,
     217.login-action-rp .wp-pwd #pass-strength-result{
     218        width: 70%;
     219}
     220
     221.login-action-rp .wp-pwd{
     222        margin-top: 5px;
     223}
     224
     225.login-action-rp .pw-weak{
     226        margin-bottom: 10px;
     227}
     228
    215229.login #pass-strength-result {
    216230        font-weight: 600;
    217231        margin: -1px 5px 16px 0;
  • home/umesh/Wordpress-core/trunk/wp-admin/js/user-profile.js

     
    8585
    8686                        if ( passStrength.className ) {
    8787                                $pass1.add( $pass1Text ).addClass( passStrength.className );
    88                                 if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
     88                                if ( $(passStrength).is('.short, .bad') ) {
    8989                                        if ( ! $weakCheckbox.prop( 'checked' ) ) {
    9090                                                $submitButtons.prop( 'disabled', true );
    9191                                        }
     
    158158                        $cancelButton;
    159159
    160160                $pass1Row = $('.user-pass1-wrap');
    161                 $pass1Label = $pass1Row.find('th label').attr( 'for', 'pass1-text' );
     161                $pass1Label = $pass1Row.find('label').attr( 'for', 'pass1-text' );
    162162
    163163                // hide this
    164164                $('.user-pass2-wrap').hide();
    165165
    166                 $submitButton = $( '#submit' ).on( 'click', function () {
     166                $submitButton = $( '#submit, #wp-submit' ).on( 'click', function () {
    167167                        updateLock = false;
    168168                });
    169169