diff --git a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php index 3ca411682a533eceac31011062cf8d548a1a9ca5..5233f3da72df2df8e162f0a023210b071f9bc57c 100644 --- a/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php +++ b/core/lib/Drupal/Core/Render/Element/PasswordConfirm.php @@ -69,7 +69,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form public static function processPasswordConfirm(&$element, FormStateInterface $form_state, &$complete_form) { $element['pass1'] = [ '#type' => 'password', - '#title' => t('Password'), + '#title' => t('New Password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'], '#required' => $element['#required'], '#attributes' => [ @@ -80,7 +80,7 @@ public static function processPasswordConfirm(&$element, FormStateInterface $for ]; $element['pass2'] = [ '#type' => 'password', - '#title' => t('Confirm password'), + '#title' => t('Confirm New password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'], '#required' => $element['#required'], '#attributes' => [ diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 881244f6f53c90dcf9c916ba4a4dc6be932b1b10..5354c8f5b8a4a9a28e7210a33451c8e4ff2d0931 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -121,6 +121,7 @@ public function form(array $form, FormStateInterface $form_state) { ], '#default_value' => (!$register ? $account->getAccountName() : ''), '#access' => $account->name->access('edit'), + '#weight' => -6, ]; // Display password field only for existing users or when user is allowed to @@ -130,6 +131,7 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'password_confirm', '#size' => 25, '#description' => $this->t('To change the current user password, enter the new password in both fields.'), + '#weight' => -4, ]; // To skip the current password field, the user must have logged in via a