Code

Use print_red display error messages during setup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Apr 2007 10:24:23 +0000 (10:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Apr 2007 10:24:23 +0000 (10:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6118 594d385d-05f5-0310-b6e9-bd551577e9d8

setup/class_setup.inc
setup/class_setupStep_Config1.inc
setup/class_setupStep_Config2.inc
setup/class_setupStep_Config3.inc
setup/setup_config1.tpl
setup/setup_config2.tpl
setup/setup_config3.tpl
setup/setup_frame.tpl

index 84c21be3dcc2761cc5e6f8809593dad4fb4eec4f..fabac97a9ef526c2198f9767d737ab23e6794079 100644 (file)
@@ -59,6 +59,12 @@ class setup
 
   function execute()
   {
+    /* display step error msgs */
+    $msgs = $this->o_steps[$this->i_current]->check();
+    foreach($msgs as $msg){
+      print_red($msg);
+    }
+
     $this->o_steps[$this->i_last]->set_active(FALSE);
     $this->o_steps[$this->i_current]->set_active();
     $content = $this->o_steps[$this->i_current]->execute();
index 0ddccb48d495163a24e67ac52772f637035f6699..c2a0449b5d21f660c01df305ef1e6da5d2f39181 100644 (file)
@@ -88,8 +88,6 @@ class Step_Config1 extends setup_step
     $smarty->assign("pwd_rules",$this->pwd_rules);
     $smarty->assign("mail_settings",$this->mail_settings);
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
-    $smarty->assign("warnings" ,$this->check());
-    $smarty->assign("warnings_cnt" ,count($this->check()));
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
     }
@@ -156,7 +154,6 @@ class Step_Config1 extends setup_step
       $message[] = _("The given password differ value is not numeric.");
     }
     return($message);
-
   }
 
   function save_object()
index 454289b1786d887510ca3cf2e72ab7272618dcdd..2e5039d76de2ac4a294897d20cd7e0e8a4a4eee8 100644 (file)
@@ -78,8 +78,6 @@ class Step_Config2 extends setup_step
     $smarty = get_smarty();
     $smarty->assign("generic_settings",$this->generic_settings);
     $smarty->assign("samba_settings",$this->samba_settings);
-    $smarty->assign("warnings" ,$this->check());
-    $smarty->assign("warnings_cnt" ,count($this->check()));
     $smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
         foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
index 93a3656cd6803ef625e2bda625bfee88d1583836..a71b13c518a4ce1ad17f161087abebc029ed294c 100644 (file)
@@ -82,10 +82,6 @@ class Step_Config3 extends setup_step
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
     }
-
-    $smarty->assign("warnings" ,$this->check());
-    $smarty->assign("warnings_cnt" ,count($this->check()));
-
     return($smarty -> fetch (get_template_path("../setup/setup_config3.tpl")));
   }
 
index 376eb5c116c734da302a462ce73fc3aede8cd676..060571ba38dfd97a74289920e47c2d6f63cda53c 100644 (file)
@@ -1,12 +1,3 @@
-
-{if $warnings_cnt}
-<b><font style='color:red' >Errors:</font></b>
-{foreach from=$warnings item=val key=key}
-       <br>
-       <font style='color:red' >{$val}</font>
-{/foreach}
-{/if}
-
 <div class='default'>
     <p><b>{t}Look and feel{/t}</b></p>
 
index 46b36ee5bbab47342cea02bb6e7777fec7f3a18c..8b3bc32275de123a45de1417e366d2496bed3b27 100644 (file)
@@ -1,11 +1,3 @@
-
-{if $warnings_cnt}
-<b><font style='color:red' >Errors:</font></b>
-{foreach from=$warnings item=val key=key}
-       <br>
-       <font style='color:red' >{$val}</font>
-{/foreach}
-{/if}
 <div class='default' style='margin:12px; '>  
     <p><b>{t}Samba settings{/t}</b></p>
     <div class='step4_container'>
index 630d8eecfe8a31bec567337b0e30b5af9c6b5cf3..45424af878ee96114d4aab25ac887fb2679ba632 100644 (file)
@@ -1,12 +1,3 @@
-
-{if $warnings_cnt}
-<b><font style='color:red' >Errors:</font></b>
-{foreach from=$warnings item=val key=key}
-       <br>
-       <font style='color:red' >{$val}</font>
-{/foreach}
-{/if}
-
 <div class='default' style='margin:12px; '>
     <div style='float:left; '>
                <br>
index b0276702affea2e251c7fa598d370aae36253142..296870743b57a19464f72516200ebac4de8eab92 100644 (file)
@@ -22,6 +22,7 @@
        
                <div class='setup_contents'>
                        <div style='border-bottom:1px dashed #AAAAAA'>
+                               {$errors}
                                {$header}
                        </div>
                        <div style='padding-left:12px;'>