- Patch #29060 by tostinne/ax: added tabindex to user login page.

4.7.x
Dries Buytaert 2005-12-11 12:53:09 +00:00
parent 544aefad8a
commit 63ece6f957
2 changed files with 6 additions and 6 deletions

View File

@ -838,15 +838,15 @@ function user_login($msg = '') {
if ($msg) { if ($msg) {
$form['message'] = array('#value' => "<p>$msg</p>"); $form['message'] = array('#value' => "<p>$msg</p>");
} }
$form['name'] = array('#type' => 'textfield', '#title' => t('Username'), '#size' => 30, '#maxlength' => 64, '#required' => TRUE); $form['name'] = array('#type' => 'textfield', '#title' => t('Username'), '#size' => 30, '#maxlength' => 64, '#required' => TRUE, '#attributes' => array('tabindex' => '1'));
if (count(user_auth_help_links()) > 0) { if (count(user_auth_help_links()) > 0) {
$form['name']['#description'] = t('Enter your %s username, or an ID from one of our affiliates: %a.', array('%s' => variable_get('site_name', 'local'), '%a' => implode(', ', user_auth_help_links()))); $form['name']['#description'] = t('Enter your %s username, or an ID from one of our affiliates: %a.', array('%s' => variable_get('site_name', 'local'), '%a' => implode(', ', user_auth_help_links())));
} }
else { else {
$form['name']['#description'] = t('Enter your %s username.', array('%s' => variable_get('site_name', 'local'))); $form['name']['#description'] = t('Enter your %s username.', array('%s' => variable_get('site_name', 'local')));
} }
$form['pass'] = array('#type' => 'password', '#title' => t('Password'), '#description' => t('Enter the password that accompanies your username.'), '#required' => TRUE); $form['pass'] = array('#type' => 'password', '#title' => t('Password'), '#description' => t('Enter the password that accompanies your username.'), '#required' => TRUE, '#attributes' => array('tabindex' => '2'));
$form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2); $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2, '#attributes' => array('tabindex' => '3'));
return drupal_get_form('user_login', $form); return drupal_get_form('user_login', $form);
} }

View File

@ -838,15 +838,15 @@ function user_login($msg = '') {
if ($msg) { if ($msg) {
$form['message'] = array('#value' => "<p>$msg</p>"); $form['message'] = array('#value' => "<p>$msg</p>");
} }
$form['name'] = array('#type' => 'textfield', '#title' => t('Username'), '#size' => 30, '#maxlength' => 64, '#required' => TRUE); $form['name'] = array('#type' => 'textfield', '#title' => t('Username'), '#size' => 30, '#maxlength' => 64, '#required' => TRUE, '#attributes' => array('tabindex' => '1'));
if (count(user_auth_help_links()) > 0) { if (count(user_auth_help_links()) > 0) {
$form['name']['#description'] = t('Enter your %s username, or an ID from one of our affiliates: %a.', array('%s' => variable_get('site_name', 'local'), '%a' => implode(', ', user_auth_help_links()))); $form['name']['#description'] = t('Enter your %s username, or an ID from one of our affiliates: %a.', array('%s' => variable_get('site_name', 'local'), '%a' => implode(', ', user_auth_help_links())));
} }
else { else {
$form['name']['#description'] = t('Enter your %s username.', array('%s' => variable_get('site_name', 'local'))); $form['name']['#description'] = t('Enter your %s username.', array('%s' => variable_get('site_name', 'local')));
} }
$form['pass'] = array('#type' => 'password', '#title' => t('Password'), '#description' => t('Enter the password that accompanies your username.'), '#required' => TRUE); $form['pass'] = array('#type' => 'password', '#title' => t('Password'), '#description' => t('Enter the password that accompanies your username.'), '#required' => TRUE, '#attributes' => array('tabindex' => '2'));
$form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2); $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2, '#attributes' => array('tabindex' => '3'));
return drupal_get_form('user_login', $form); return drupal_get_form('user_login', $form);
} }