From: hickert Date: Thu, 19 Apr 2007 10:24:23 +0000 (+0000) Subject: Use print_red display error messages during setup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=52708033b06693c8fa2479266ceaff7cf6d0cfed;p=gosa.git Use print_red display error messages during setup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6118 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/setup/class_setup.inc b/setup/class_setup.inc index 84c21be3d..fabac97a9 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -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(); diff --git a/setup/class_setupStep_Config1.inc b/setup/class_setupStep_Config1.inc index 0ddccb48d..c2a0449b5 100644 --- a/setup/class_setupStep_Config1.inc +++ b/setup/class_setupStep_Config1.inc @@ -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() diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc index 454289b17..2e5039d76 100644 --- a/setup/class_setupStep_Config2.inc +++ b/setup/class_setupStep_Config2.inc @@ -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); diff --git a/setup/class_setupStep_Config3.inc b/setup/class_setupStep_Config3.inc index 93a3656cd..a71b13c51 100644 --- a/setup/class_setupStep_Config3.inc +++ b/setup/class_setupStep_Config3.inc @@ -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"))); } diff --git a/setup/setup_config1.tpl b/setup/setup_config1.tpl index 376eb5c11..060571ba3 100644 --- a/setup/setup_config1.tpl +++ b/setup/setup_config1.tpl @@ -1,12 +1,3 @@ - -{if $warnings_cnt} -Errors: -{foreach from=$warnings item=val key=key} -
- {$val} -{/foreach} -{/if} -

{t}Look and feel{/t}

diff --git a/setup/setup_config2.tpl b/setup/setup_config2.tpl index 46b36ee5b..8b3bc3227 100644 --- a/setup/setup_config2.tpl +++ b/setup/setup_config2.tpl @@ -1,11 +1,3 @@ - -{if $warnings_cnt} -Errors: -{foreach from=$warnings item=val key=key} -
- {$val} -{/foreach} -{/if}

{t}Samba settings{/t}

diff --git a/setup/setup_config3.tpl b/setup/setup_config3.tpl index 630d8eecf..45424af87 100644 --- a/setup/setup_config3.tpl +++ b/setup/setup_config3.tpl @@ -1,12 +1,3 @@ - -{if $warnings_cnt} -Errors: -{foreach from=$warnings item=val key=key} -
- {$val} -{/foreach} -{/if} -

diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl index b0276702a..296870743 100644 --- a/setup/setup_frame.tpl +++ b/setup/setup_frame.tpl @@ -22,6 +22,7 @@
+ {$errors} {$header}