Commit 36cd6b2b authored by Steven Wittens's avatar Steven Wittens
Browse files

#107966: Make login fields consistent size.

parent 8bd8a972
...@@ -1102,6 +1102,10 @@ function expand_password_confirm($element) { ...@@ -1102,6 +1102,10 @@ function expand_password_confirm($element) {
$element['#validate'] = array('password_confirm_validate' => array()); $element['#validate'] = array('password_confirm_validate' => array());
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
if (isset($element['#size'])) {
$element['pass1']['#size'] = $element['pass2']['#size'] = $element['#size'];
}
return $element; return $element;
} }
......
...@@ -62,7 +62,7 @@ function system_elements() { ...@@ -62,7 +62,7 @@ function system_elements() {
$type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => TRUE); $type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => TRUE);
$type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => FALSE); $type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => FALSE);
$type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE); $type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE);
$type['password'] = array('#input' => TRUE, '#size' => 30); $type['password'] = array('#input' => TRUE, '#size' => 60);
$type['password_confirm'] = array('#input' => TRUE, '#process' => array('expand_password_confirm' => array())); $type['password_confirm'] = array('#input' => TRUE, '#process' => array('expand_password_confirm' => array()));
$type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5); $type['textarea'] = array('#input' => TRUE, '#cols' => 60, '#rows' => 5);
$type['radios'] = array('#input' => TRUE, '#process' => array('expand_radios' => array())); $type['radios'] = array('#input' => TRUE, '#process' => array('expand_radios' => array()));
......
...@@ -1312,6 +1312,7 @@ function user_edit_form($uid, $edit, $register = FALSE) { ...@@ -1312,6 +1312,7 @@ function user_edit_form($uid, $edit, $register = FALSE) {
if (!$register) { if (!$register) {
$form['account']['pass'] = array('#type' => 'password_confirm', $form['account']['pass'] = array('#type' => 'password_confirm',
'#description' => t('To change the current user password, enter the new password in both fields.'), '#description' => t('To change the current user password, enter the new password in both fields.'),
'#size' => 25,
); );
} }
elseif (!variable_get('user_email_verification', TRUE) || $admin) { elseif (!variable_get('user_email_verification', TRUE) || $admin) {
...@@ -1319,6 +1320,7 @@ function user_edit_form($uid, $edit, $register = FALSE) { ...@@ -1319,6 +1320,7 @@ function user_edit_form($uid, $edit, $register = FALSE) {
'#type' => 'password_confirm', '#type' => 'password_confirm',
'#description' => t('Provide a password for the new account in both fields.'), '#description' => t('Provide a password for the new account in both fields.'),
'#required' => TRUE, '#required' => TRUE,
'#size' => 25,
); );
} }
if ($admin) { if ($admin) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment