summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8598bc3)
raw | patch | inline | side by side (parent: 8598bc3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jun 2007 09:02:37 +0000 (09:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jun 2007 09:02:37 +0000 (09:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6694 594d385d-05f5-0310-b6e9-bd551577e9d8
html/index.php | patch | blob | history | |
html/main.php | patch | blob | history | |
ihtml/themes/default/framework.tpl | patch | blob | history |
diff --git a/html/index.php b/html/index.php
index 7977dfab03cb46087fa67931475669ce426df3d3..7a947cd583a49b294de1ea13a4b5c2e3157225ce 100644 (file)
--- a/html/index.php
+++ b/html/index.php
} else {
$smarty->assign("php_errors", "");
}
-displayLogin();
+/* 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);
+displayLogin();
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/html/main.php b/html/main.php
index 9fc1077a42437e7638d9b7a44fad9c5f29f4c03b..7e001e122b95b0735204f821156af82bd56c7cca 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Print_out last ErrorMessage repeated string. */
-print_red(NULL);
$smarty->assign("contents", $display);
} 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... */
index be547d1e36079e8a695223b6cd03fc2ee6e312cd..a3553282e747ed5e7a32a1b1c4810c96c13fbddf 100644 (file)
</table>
</td>
</tr>
-</table></form></body></html>
+</table>{$errors}{$focus}</form></body></html>