Code

Reenabled error messages
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Nov 2007 09:31:07 +0000 (09:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Nov 2007 09:31:07 +0000 (09:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7840 594d385d-05f5-0310-b6e9-bd551577e9d8

html/main.php
html/setup.php

index 50a3e87cf72b4cee54dd97a03541ff53e8afe51e..1583904f7694bc2cefe594a164f7cc5364ab52ec 100644 (file)
@@ -393,11 +393,9 @@ if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
   $focus.= '</script>';
 }
 
- $focus= '<script language="JavaScript" type="text/javascript">';
-  $focus.= 'next_msg_dialog();';
-  $focus.= '</script>';
-
-
+$focus= '<script language="JavaScript" type="text/javascript">';
+$focus.= 'next_msg_dialog();';
+$focus.= '</script>';
 $smarty->assign("focus", $focus);
 
 $display= $header.$smarty->fetch(get_template_path('framework.tpl'));
index d681cacf063f872a86ff2c7263fc6b1cc994b80e..e98b41cfbf7810569d90ea8d37e42f1a9fcb785c 100644 (file)
@@ -117,22 +117,33 @@ print_red(NULL);
 
 $smarty->assign("date", date("l, dS F Y H:i:s O"));
 $header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('setup_headers.tpl'));
+
+
+
+/* Set focus to the error button if we've an error message */
+$focus= "";
+if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
+  $focus= '<script language="JavaScript" type="text/javascript">';
+  $focus.= 'document.forms[0].error_accept.focus();';
+  $focus.= '</script>';
+}
+
+$focus= '<script language="JavaScript" type="text/javascript">';
+$focus.= 'next_msg_dialog();';
+$focus.= '</script>';
+
 /* show web frontend */
 $smarty->assign("contents"  , $display);
 $smarty->assign("navigation", $_SESSION['setup']->get_navigation_html());
 $smarty->assign("header", $_SESSION['setup']->get_header_html());
-$smarty->assign("bottom", $_SESSION['setup']->get_bottom_html());
+$smarty->assign("bottom", $focus.$_SESSION['setup']->get_bottom_html());
+$smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
 
 if ($error_collector != ""){
   $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector)."</div>");
 } else {
   $smarty->assign("php_errors", "");
 }
-if (isset($_SESSION['errors'])){
-  $smarty->assign("errors", $_SESSION['errors']);
-}else{
-  $smarty->assign("errors"    , "");
-}
 
 $smarty->assign("version",get_gosa_version());