mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@41556 git-svn-id: http://core.svn.wordpress.org/trunk@41389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
27536e99c5
commit
220d5aec74
@ -73,6 +73,25 @@ p {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.login .password-input-wrapper {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.login .input.password-input {
|
||||
display: table-cell;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login .pw-weak {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.login .button.button-secondary {
|
||||
display: table-cell;
|
||||
border-radius: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.login form {
|
||||
margin-top: 20px;
|
||||
margin-right: 0;
|
||||
|
2
wp-admin/css/login-rtl.min.css
vendored
2
wp-admin/css/login-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -73,6 +73,25 @@ p {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.login .password-input-wrapper {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.login .input.password-input {
|
||||
display: table-cell;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login .pw-weak {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.login .button.button-secondary {
|
||||
display: table-cell;
|
||||
border-radius: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.login form {
|
||||
margin-top: 20px;
|
||||
margin-left: 0;
|
||||
|
2
wp-admin/css/login.min.css
vendored
2
wp-admin/css/login.min.css
vendored
File diff suppressed because one or more lines are too long
@ -161,7 +161,7 @@
|
||||
// hide this
|
||||
$('.user-pass2-wrap').hide();
|
||||
|
||||
$submitButton = $( '#submit' ).on( 'click', function () {
|
||||
$submitButton = $( '#submit, #wp-submit' ).on( 'click', function () {
|
||||
updateLock = false;
|
||||
});
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
|
||||
if ( passStrength.className ) {
|
||||
$pass1.add( $pass1Text ).addClass( passStrength.className );
|
||||
if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
|
||||
if ( $( passStrength ).is( '.short, .bad' ) ) {
|
||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
}
|
||||
|
2
wp-admin/js/user-profile.min.js
vendored
2
wp-admin/js/user-profile.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41555';
|
||||
$wp_version = '4.9-alpha-41556';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
15
wp-login.php
15
wp-login.php
@ -644,11 +644,20 @@ case 'rp' :
|
||||
</p>
|
||||
|
||||
<div class="wp-pwd">
|
||||
<span class="password-input-wrapper">
|
||||
<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" />
|
||||
</span>
|
||||
<div class="password-input-wrapper">
|
||||
<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" />
|
||||
<span class="button button-secondary wp-hide-pw hide-if-no-js">
|
||||
<span class="dashicons dashicons-hidden"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
|
||||
</div>
|
||||
<div class="pw-weak">
|
||||
<label>
|
||||
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
|
||||
<?php _e( 'Confirm use of weak password' ); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="user-pass2-wrap">
|
||||
|
Loading…
Reference in New Issue
Block a user