Code

Added DNS and DHCP enable disable options into setup step 2
[gosa.git] / html / main.php
index 8a250fd0d005657412bd9ec31045fac178517ee5..5a7261cb9e7ee7516d8b95e3dcffdacc649b0982 100644 (file)
@@ -143,7 +143,6 @@ if(!isset($_SESSION['CurrentMainBase'])){
   $_SESSION['CurrentMainBase']= get_base_from_people($ui->dn);
 }
 
-$lang.=".UTF-8";
 putenv("LANGUAGE=");
 putenv("LANG=$lang");
 setlocale(LC_ALL, $lang);
@@ -364,7 +363,6 @@ if (is_file("$plugin_dir/main.inc")){
 
 
 /* Print_out last ErrorMessage repeated string. */
-print_red(NULL);
 
 $smarty->assign("contents", $display);
 
@@ -373,10 +371,20 @@ if (isset($_SESSION['errors'])){
   $smarty->assign("errors", $_SESSION['errors']);
 }
 if ($error_collector != ""){
-  $smarty->assign("php_errors", $error_collector."</div>");
+  $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector)."</div>");
 } else {
   $smarty->assign("php_errors", "");
 }
+
+/* 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>';
+}
+$smarty->assign("focus", $focus);
+
 $display= $header.$smarty->fetch(get_template_path('framework.tpl'));
 
 /* Show page... */