Code

Fixed some error message for login.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Dec 2006 05:09:44 +0000 (05:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Dec 2006 05:09:44 +0000 (05:09 +0000)
-If "schema files are not readable error" occurs the login was ugly broken.
The alignment of the error messages in login was right. Now they are centered again.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5386 594d385d-05f5-0310-b6e9-bd551577e9d8

html/index.php
ihtml/themes/default/login.tpl

index 9877161c96ac60495c7d8eba693a47098718cca0..583f78f88be00158994f3fbda33b199ed617e18e 100644 (file)
@@ -221,18 +221,16 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){
     require_once("functions_setup.inc");
     if(!is_schema_readable($config->current['SERVER'],$config->current['ADMIN'],$config->current['PASSWORD'])){
       print_red(_("GOsa cannot retrieve information about the installed schema files. Please make sure, that this is possible."));
-      $smarty->display(get_template_path('headers.tpl'));
-      echo "<body>".$_SESSION['errors']."</body></html>";
-      exit();
+      displayLogin();
+      exit()  ;
     }else{
       $str = (schema_check($config->current['SERVER'],$config->current['ADMIN'],$config->current['PASSWORD'],0,TRUE));
       $checkarr = array();
       foreach($str as $tr){
         if(isset($tr['needonstartup'])){
           print_red($tr['msg']."<br>"._("Your ldap setup contains old schema definitions. Please re-run the setup."));
-          $smarty->display(get_template_path('headers.tpl'));
-          echo "<body>".$_SESSION['errors']."</body></html>";
-          exit();
+          displayLogin();
+          exit()  ;
         }
       }
     }
index 9dd1f0233090f6fcbcb8d888c86ebc7479aeaa80..531119dfbae09a0742a4f6a315b25e8c2381cc42 100644 (file)
@@ -1,6 +1,7 @@
 <body style="background-color: #8B858B;background-image:none;">
 {* GOsa login - smarty template *}
 {$php_errors}
+{$errors}
 
 <!-- Spacer for some browsers -->
 <div class='gosaLoginSpacer'></div>
@@ -21,7 +22,6 @@
  
     <!-- Formular data, containing a table to center fields -->
     <form action='index.php' method='post' name='mainform' onSubmit='js_check(this);return true;'>
-     {$errors}
      <table summary="" style='vertical-align:middle; text-align:left;' cellspacing='7' align='center'>
       <tr>
         <td>