diff --git a/html/main.php b/html/main.php
index 8a250fd0d005657412bd9ec31045fac178517ee5..5a7261cb9e7ee7516d8b95e3dcffdacc649b0982 100644 (file)
--- a/html/main.php
+++ b/html/main.php
$_SESSION['CurrentMainBase']= get_base_from_people($ui->dn);
}
-$lang.=".UTF-8";
putenv("LANGUAGE=");
putenv("LANG=$lang");
setlocale(LC_ALL, $lang);
/* Print_out last ErrorMessage repeated string. */
-print_red(NULL);
$smarty->assign("contents", $display);
$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... */