summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/html.php8
-rw-r--r--lib/exe/js.php1
-rw-r--r--lib/scripts/script.js8
3 files changed, 14 insertions, 3 deletions
diff --git a/inc/html.php b/inc/html.php
index 1bce0210e..9bd926c03 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -52,24 +52,26 @@ function html_login(){
print p_locale_xhtml('login');
?>
<div class="centeralign">
- <form action="<?php echo script()?>" accept-charset="<?php echo $lang['encoding']?>" method="post">
+ <form action="<?php echo script()?>" accept-charset="<?php echo $lang['encoding']?>"
+ method="post" name="login">
<fieldset>
<legend><?php echo $lang['btn_login']?></legend>
<input type="hidden" name="id" value="<?php echo $ID?>" />
<input type="hidden" name="do" value="login" />
<label class="block">
<span><?php echo $lang['user']?></span>
- <input type="text" name="u" value="<?php echo formText($_REQUEST['u'])?>" class="edit" />
+ <input type="text" name="u" value="<?php echo formText($_REQUEST['u'])?>"
+ class="edit" id="focus__this" />
</label><br />
<label class="block">
<span><?php echo $lang['pass']?></span>
<input type="password" name="p" class="edit" />
</label><br />
- <input type="submit" value="<?php echo $lang['btn_login']?>" class="button" />
<label for="remember__me" class="simple">
<input type="checkbox" name="r" id="remember__me" value="1" />
<span><?php echo $lang['remember']?></span>
</label>
+ <input type="submit" value="<?php echo $lang['btn_login']?>" class="button" />
</fieldset>
</form>
<?php
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 2aa9c4399..de996a117 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -141,6 +141,7 @@ function js_out(){
// add scroll event and tooltip rewriting
js_runonstart('updateAccessKeyTooltip()');
js_runonstart('scrollToMarker()');
+ js_runonstart('focusMarker()');
// initialize init pseudo event
echo 'if (document.addEventListener) {'.NL;
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index 1f5a71e78..7c42191c4 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -409,6 +409,14 @@ function scrollToMarker(){
}
/**
+ * Looks for an element with the ID focus__this at sets focus to it
+ */
+function focusMarker(){
+ var obj = $('focus__this');
+ if(obj) obj.focus();
+}
+
+/**
* Remove messages
*/
function cleanMsgArea(){