Making WordPress.org


Ignore:
Timestamp:
02/27/2018 02:40:12 AM (8 years ago)
Author:
obenland
Message:

2FA Make login markup and styles blend in better

See #77.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-two-factor/providers/class-wporg-two-factor-primary.php

    r6759 r6782  
    3434        return $this->is_valid_authcode( $key, $code );
    3535    }
     36
     37    /**
     38     * Prints the form that prompts the user to authenticate.
     39     *
     40     * @param WP_User $user WP_User object of the logged-in user.
     41     */
     42    public function authentication_page( $user ) {
     43        require_once ABSPATH . '/wp-admin/includes/template.php';
     44        ?>
     45        <p>
     46            <label for="authcode"><?php esc_html_e( 'Authentication Code:', 'wporg' ); ?></label>
     47            <input type="tel" name="authcode" id="authcode" class="input" value="" size="20" pattern="[0-9]*" />
     48        </p>
     49        <script type="text/javascript">
     50            setTimeout( function(){
     51                var d;
     52                try{
     53                    d = document.getElementById( 'authcode' );
     54                    d.value = '';
     55                    d.focus();
     56                } catch(e){}
     57            }, 200);
     58        </script>
     59        <?php
     60        submit_button( __( 'Authenticate', 'wporg' ), 'primary', 'submit', false );
     61    }
    3662}
Note: See TracChangeset for help on using the changeset viewer.