summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28ed51f)
raw | patch | inline | side by side (parent: 28ed51f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 10:19:15 +0000 (10:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 10:19:15 +0000 (10:19 +0000) |
- Work iwth password dialogs again
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17929 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17929 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/include/gosa.js | patch | blob | history | |
gosa-core/ihtml/themes/default/login.tpl | patch | blob | history |
index 83f956fc712872216a747569d1c5554ab954ebb4..135105eccbcc7f4c21362f2b63a84f321fb9d11d 100644 (file)
/* Global key handler to estimate which element gets the next focus if enter is pressed */
function keyHandler(DnEvents) {
+
+ var element = Event.element(DnEvents);
+
// determines whether Netscape or Internet Explorer
k = (Prototype.Browser.Gecko) ? DnEvents.keyCode : window.event.keyCode;
if (k == 13) { // enter key pressed
+
+
+ // Stop 'Enter' key-press from beeing handled internally
+ Event.stop(DnEvents);
+
if(typeof(nextfield)!='undefined') {
+
+ var next_element = $(nextfield);
+ if(next_element.type == 'submit'){
+ $('mainform').submit();
+ return(false);
+ }
+
+
if(nextfield == 'login') {
return true; // submit, we finished all fields
} else { // we are not done yet, send focus to next box
index 049d835015d6b7776a081402d26e99482e675ede..60e02adea648533541043730d1daf366d9a7cc28 100644 (file)
</ul>
</div>
- <form action='index.php' method='post' name='mainform' onSubmit='js_check(this);return true;'>
+ <form action='index.php' method='post' name='mainform' id='mainform' onSubmit='js_check(this);return true;'>
{image path="images/empty.png" align="top" action="focus"}
{$msg_dialogs}
</select>
</div>
<div class='right'>
- <button type='submit' name='login' title='{t}Click here to log in{/t}' onFocus="nextfield='login';">{t}Log in{/t}</button>
+ <button type='submit' name='login' id='login' title='{t}Click here to log in{/t}' onFocus="nextfield='login';">{t}Log in{/t}</button>
<input type='hidden' name='login' value='{t}Log in{/t}' />
</div>
<div class="clear"></div>