From: hickert Date: Mon, 29 May 2006 08:59:38 +0000 (+0000) Subject: Removed chkbx and added inherited to select box X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a4d8880f236565f2c39304643e4ca870d5a087b;p=gosa.git Removed chkbx and added inherited to select box git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3538 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index ad9077747..cf53ff272 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -43,7 +43,6 @@ class workstartup extends plugin /* FAI class selection */ - var $FAIinherit = false; var $InheritedFAIclass = array(); var $InheritedFAIrelease = ""; var $InheritedFAIdebianMirror = "auto"; @@ -320,7 +319,7 @@ class workstartup extends plugin } if(count($this->FAIclass)==0 && $this->FAIrelease == ""){ - $this->FAIinherit =true; + $this->FAIdebianMirror = "inherited"; } } @@ -397,6 +396,8 @@ class workstartup extends plugin function selectFriendlyClasses(){ $tmp=array(); + if($this->FAIdebianMirror == "inherited") return($tmp); + /* check if the current release exists, else select the first one .. */ @@ -677,14 +678,12 @@ class workstartup extends plugin $smarty->assign($val."ACL", chkacl($this->acl, $val)); } - $smarty->assign("FAIinherit",$this->FAIinherit); $smarty->assign("FAIdebianMirrors",$this->getFAIdebianMirrors()); $smarty->assign("FAIreleases",$this->getFAIreleases()); $smarty->assign("FAIrelease",$this->FAIrelease); $smarty->assign("FAIclasses",$this->selectFriendlyClasses()); $smarty->assign("FAIclassesKeys",array_flip($this->selectFriendlyClasses())); $smarty->assign("FAIclassKeys",$this->FAIclass); - $smarty->assign("InheritedFAIdebianMirror",$this->InheritedFAIdebianMirror); $smarty->assign("InheritedFAIrelease",$this->InheritedFAIrelease); $div = new divSelectBox("WSFAIscriptClasses"); @@ -696,7 +695,7 @@ class workstartup extends plugin $i = 1; - if($this->FAIinherit){ + if($this->FAIdebianMirror == "inherited"){ $tmp = $this->InheritedFAIclass; }else{ $tmp = $this->FAIclass; @@ -704,7 +703,7 @@ class workstartup extends plugin foreach($tmp as $class){ - if($this->FAIinherit){ + if($this->FAIdebianMirror == "inherited"){ $str = ""; }else{ if($i==1){ @@ -780,6 +779,7 @@ class workstartup extends plugin function getFAIdebianMirrors() { $ret = array(); + $ret['inherited']="["._("inherited")."]"; $ret['auto']=_("automatic"); $secs = array(); @@ -816,6 +816,8 @@ class workstartup extends plugin { $ret = array(); + if($this->FAIdebianMirror == "inherited") return(array()); + if(!isset($this->FAIServRepConfig[$this->FAIdebianMirror])){ $this->FAIdebianMirror = "auto"; } @@ -879,13 +881,6 @@ class workstartup extends plugin $this->customParameters= $_POST["customParameters"]; } - if(isset($_POST['WorkstationStarttabPosted'])){ - if(isset($_POST['FAIinherit'])){ - $this->FAIinherit = true; - }else{ - $this->FAIinherit = false; - } - } } @@ -961,7 +956,7 @@ class workstartup extends plugin $str = ""; - if($this->FAIinherit){ + if($this->FAIdebianMirror == "inherited"){ $this->attrs['FAIclass'] = $this->attrs['FAIrelease'] = $this->attrs['FAIdebianMirror'] = array(); diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl index d27ce0b5d..9466a5092 100644 --- a/plugins/admin/systems/workstationStartup.tpl +++ b/plugins/admin/systems/workstationStartup.tpl @@ -33,15 +33,9 @@ - {if $FAIinherit == true} + {if $FAIdebianMirror == "inherited"} - - -
- {t}Inherit FAI settings{/t} -

 {t}FAI server{/t} @@ -54,8 +48,8 @@

- + {html_options options=$FAIdebianMirrors output=$FAIdebianMirrors selected=$FAIdebianMirror} @@ -72,12 +66,6 @@ {else} - - -
- {t}Inherit FAI settings{/t} -

 {t}FAI server{/t}