summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-05-27 20:52:38 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-05-27 20:52:38 +0200
commit8d975344733b7ae67df7b86295348b661bbe0385 (patch)
treef5441d5cb7318a0da8f26aa2a1b3768584def1bc
parentf6fe1780d3e39e494b86e7c723cbde66a8b7ddde (diff)
downloadrpg-8d975344733b7ae67df7b86295348b661bbe0385.tar.gz
rpg-8d975344733b7ae67df7b86295348b661bbe0385.tar.bz2
usability enhancements for the loginform #803
darcs-hash:20060527185238-7ad00-1593c8b25d7f870c8a0b3017fbcf29c4e047f52c.gz
-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(){