Code

Added focus to error window
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jun 2007 07:18:17 +0000 (07:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jun 2007 07:18:17 +0000 (07:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6686 594d385d-05f5-0310-b6e9-bd551577e9d8

html/main.php

index 70139695098cb8f437133ffa988213665e0035bf..fd5afa99b898c36ed4fcfb82aa702a6a931cf713 100644 (file)
@@ -396,6 +396,13 @@ if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->d
 /* Show page... */
 echo $display;
 
+/* 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>';
+}
+
 /* Save plist and config */
 $_SESSION['plist']= $plist;
 $_SESSION['config']= $config;