From 641aa93ac42d70af7c058c58f8c30c0f359a40e7 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 26 Jun 2007 09:02:37 +0000 Subject: [PATCH] Implemented error msg changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6694 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/index.php | 10 +++++++++- html/main.php | 11 ++++++++++- ihtml/themes/default/framework.tpl | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/html/index.php b/html/index.php index 7977dfab0..7a947cd58 100644 --- a/html/index.php +++ b/html/index.php @@ -370,8 +370,16 @@ if ($error_collector != ""){ } 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= ''; +} +$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 9fc1077a4..7e001e122 100644 --- a/html/main.php +++ b/html/main.php @@ -365,7 +365,6 @@ if (is_file("$plugin_dir/main.inc")){ /* Print_out last ErrorMessage repeated string. */ -print_red(NULL); $smarty->assign("contents", $display); @@ -378,6 +377,16 @@ if ($error_collector != ""){ } 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= ''; +} +$smarty->assign("focus", $focus); + $display= $header.$smarty->fetch(get_template_path('framework.tpl')); /* Show page... */ diff --git a/ihtml/themes/default/framework.tpl b/ihtml/themes/default/framework.tpl index be547d1e3..a3553282e 100644 --- a/ihtml/themes/default/framework.tpl +++ b/ihtml/themes/default/framework.tpl @@ -53,4 +53,4 @@ - +{$errors}{$focus} -- 2.30.2