diff --git a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php index 0354e25..4e88e2a 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php @@ -177,6 +177,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#attributes' => array('class' => array('username')), ); $form['admin_account']['account']['pass'] = array( + '#title' => $this->t('Password'), '#type' => 'password_confirm', '#required' => TRUE, '#size' => 25, diff --git a/core/modules/user/css/user.module.css b/core/modules/user/css/user.module.css index 0b6afcf..6fbec09 100644 --- a/core/modules/user/css/user.module.css +++ b/core/modules/user/css/user.module.css @@ -16,6 +16,3 @@ width: 0; background-color: gray; } -.password-confirm-match { - visibility: hidden; -} diff --git a/core/modules/user/css/user.theme.css b/core/modules/user/css/user.theme.css index 52413e0..7393426 100644 --- a/core/modules/user/css/user.theme.css +++ b/core/modules/user/css/user.theme.css @@ -26,10 +26,8 @@ background-color: #77b259; } -.password-confirm, .password-field, -.password-strength, -.password-confirm-match { +.password-strength { width: 55%; } diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 8c14682..d662c7b 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -119,9 +119,10 @@ public function form(array $form, FormStateInterface $form_state) { // assign a password during registration. if (!$register) { $form['account']['pass'] = array( + '#title' => $this->t('Password'), '#type' => 'password_confirm', '#size' => 25, - '#description' => $this->t('To change the current user password, enter the new password in both fields.'), + '#description' => $this->t('To change the current user password, enter the new password.'), ); // To skip the current password field, the user must have logged in via a @@ -178,9 +179,10 @@ public function form(array $form, FormStateInterface $form_state) { } elseif (!$config->get('verify_mail') || $admin) { $form['account']['pass'] = array( + '#title' => $this->t('Password'), '#type' => 'password_confirm', '#size' => 25, - '#description' => $this->t('Provide a password for the new account in both fields.'), + '#description' => $this->t('Provide a password for the new account.'), '#required' => TRUE, ); } diff --git a/core/modules/user/user.js b/core/modules/user/user.js index ded4c0a..09305eb 100644 --- a/core/modules/user/user.js +++ b/core/modules/user/user.js @@ -9,39 +9,19 @@ Drupal.behaviors.password = { attach: function (context, settings) { var translate = settings.password; - $(context).find('input.password-field').once('password', function () { + $(context).find('input[type=password][data-drupal-revealpass]').once('password', function () { var passwordInput = $(this); var innerWrapper = $(this).parent(); - var outerWrapper = $(this).parent().parent(); - var passwordDescription; - + var passwordDescription = $('
').hide(); // Add identifying class to password element parent. innerWrapper.addClass('password-parent'); - // Add the password confirmation layer. - outerWrapper.find('input.password-confirm').parent().append('