summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kolab_client_task.php3
-rw-r--r--lib/kolab_html.php6
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index c2d479b..67d3d29 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -548,7 +548,8 @@ class kolab_client_task
'type' => 'text',
'id' => 'login_name',
'name' => 'login[username]',
- 'value' => $post['username']));
+ 'value' => $post['username'],
+ 'autofocus' => true));
$password = kolab_html::label(array(
'for' => 'login_pass',
diff --git a/lib/kolab_html.php b/lib/kolab_html.php
index d69943d..afce918 100644
--- a/lib/kolab_html.php
+++ b/lib/kolab_html.php
@@ -35,8 +35,8 @@ class kolab_html
public static $td_attribs = array('colspan', 'rowspan');
public static $textarea_attribs = array('cols', 'rows', 'disabled', 'name', 'readonly', 'tabindex');
public static $input_attribs = array('checked', 'disabled', 'name', 'readonly', 'tabindex',
- 'type', 'size', 'maxlength', 'value');
- public static $select_attribs = array('multiple', 'name', 'size', 'disabled');
+ 'type', 'size', 'maxlength', 'value', 'autofocus');
+ public static $select_attribs = array('multiple', 'name', 'size', 'disabled', 'autofocus');
public static $option_attribs = array('selected', 'value', 'disabled');
public static $a_attribs = array('href', 'name', 'rel', 'tabindex', 'target');
public static $form_attribs = array('action', 'enctype', 'method', 'name', 'target');
@@ -300,7 +300,7 @@ class kolab_html
}
// boolean attributes
- if (preg_match('/^(checked|multiple|disabled|selected|readonly)$/', $key)) {
+ if (preg_match('/^(checked|multiple|disabled|selected|readonly|autofocus)$/', $key)) {
if ($value) {
$attrib_arr[] = sprintf('%s="%s"', $key, $key);
}