Code

Focus for login window.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jun 2007 07:20:03 +0000 (07:20 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jun 2007 07:20:03 +0000 (07:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6687 594d385d-05f5-0310-b6e9-bd551577e9d8

html/index.php

index c33e7bbcd51c8dd10d7c658ff7ef9b39166db3a0..4ace274aa5653e116629c7174fbd5f39069dffca 100644 (file)
@@ -380,6 +380,12 @@ if ($error_collector != ""){
 }
 displayLogin();
 
+/* Set focus to the error button if we've an error message */
+if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
+  echo '<script language="JavaScript" type="text/javascript">';
+  echo 'document.forms[0].error_accept.focus();';
+  echo '</script>';
+}
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>