From: cajus Date: Tue, 26 Jun 2007 08:07:42 +0000 (+0000) Subject: Updated focus handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2e1c5f46b3c99de973e7ae3e844014564b10c2f;p=gosa.git Updated focus handling git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6688 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/index.php b/html/index.php index 4ace274aa..b7f1ae83a 100644 --- a/html/index.php +++ b/html/index.php @@ -378,14 +378,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'] != ""){ - echo ''; + $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 fd5afa99b..ffb834262 100644 --- a/html/main.php +++ b/html/main.php @@ -379,6 +379,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')); if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST']))&&(!empty($display))&&(is_callable("tidy_parse_string"))) { @@ -396,13 +406,6 @@ if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->d /* Show page... */ echo $display; -/* Set focus to the error button if we've an error message */ -if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){ - echo ''; -} - /* Save plist and config */ $_SESSION['plist']= $plist; $_SESSION['config']= $config; diff --git a/ihtml/themes/default/framework.tpl b/ihtml/themes/default/framework.tpl index a8a4f579e..dfe3a107c 100644 --- a/ihtml/themes/default/framework.tpl +++ b/ihtml/themes/default/framework.tpl @@ -65,4 +65,4 @@ - +{$focus} diff --git a/ihtml/themes/default/login.tpl b/ihtml/themes/default/login.tpl index 90278b390..e6c20cde7 100644 --- a/ihtml/themes/default/login.tpl +++ b/ihtml/themes/default/login.tpl @@ -58,6 +58,7 @@ + {$focus} diff --git a/include/functions.inc b/include/functions.inc index 52cf1a824..5ee56ebfc 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1152,7 +1152,7 @@ function print_red() get_template_path($img)."'>". "

"._("An error occurred while processing your request"). "

$string

$addmsg
"; }