Code

Unified Error message display
[gosa.git] / html / main.php
index 81d9f4bf623e4d23e777f0960b6fce7935d88df3..8743d378c3ce95928156212ba1c7d0ef2c08fd71 100644 (file)
@@ -208,7 +208,7 @@ if ($_SESSION['js']==FALSE){
   $smarty->assign("help_method", "href='helpviewer.php$plug' target='_new'");
 } else {
   $smarty->assign("javascript", "true");
-  $smarty->assign("help_method","href='' onclick=\"return popup('helpviewer.php$plug','GOsa help');\"");
+  $smarty->assign("help_method"," onclick=\"return popup('helpviewer.php$plug','GOsa help');\"");
 }
 
 $smarty->assign ("username", $ui->username);
@@ -281,8 +281,6 @@ $display= $header.$smarty->fetch(get_template_path('framework.tpl'));
 if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST'])) {
 
   /* Use PHP tidy for debugging */
-  // Specify configuration
-
   $tidy = new tidy();
   $config = array('indent' => TRUE,
                'output-xhtml' => TRUE,
@@ -291,7 +289,9 @@ if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->da
   tidy_clean_repair($display);
   $cnt =  (tidy_error_count($display))+(tidy_warning_count($display));
   if($cnt != 0){
-    echo nl2br(htmlentities($display->errorBuffer));
+    echo "<table width=\"100%\" style='background-color:#E0E0E0;border-bottom:1px solid black'><tr><td><img alt=\"\" align=\"middle\" src='images/warning.png'>&nbsp;<font style='font-size:14px;font-weight:bold'>"._("Generating this page caused the W3C conformance checker to raise some errors!")."</font></td><td align=right><button onClick='toggle(\"w3cbox\")'>"._("Toggle information")."</button></td></tr></table><div id='w3cbox' style='width:100%; position:absolute; z-index:0; visibility: hidden; background-color:white; border-bottom:1px solid black;'>";
+
+    echo nl2br(htmlentities($display->errorBuffer))."</div>";
   }
   tidy_clean_repair($display);
 }