From: hickert Date: Fri, 7 Oct 2005 10:21:15 +0000 (+0000) Subject: Better gray out X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e51bd609d694c4708925f3ae3ca8556caabe7720;p=gosa.git Better gray out git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1533 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index de42cecfb..ac0c81a44 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -100,6 +100,7 @@ class faiPackage extends plugin if(empty($this->FAIdebianRelease)){ $disableSection = $disableMirror = $disableOptions = true; + $this->sections=array("---"); }elseif(empty($this->FAIdebianSection)){ $disableRelease = $disableMirror = $disableOptions = true; }elseif(empty($this->FAIdebianMirror)){ @@ -108,6 +109,25 @@ class faiPackage extends plugin $disableRelease = $disableSection = true; } + $this->genMirror(); + + $availableServer = array(); + foreach($this->mirrors as $mir){ + if(($mir['release'] == $this->FAIdebianRelease)&&($mir['section']==$this->FAIdebianSection)){ + $availableServer[$mir['mirror']]=$mir['mirror']; + } + } + + if(($disableMirror==false)&&(count($availableServer)==0)){ + $this->FAIdebianRelease = $this->FAIdebianSection = $this->FAIdebianMirror = ""; + $disableSection = $disableMirror = $disableOptions = true; + $disableRelease = false; + } + + if(count($availableServer)==0){ + $availableServer=array("---"); + } + $smarty->assign("ReleaseACL" , ""); $smarty->assign("MirrorACL" , ""); $smarty->assign("OptionACL" , ""); @@ -126,19 +146,6 @@ class faiPackage extends plugin $smarty->assign("SectionACL"," disabled "); } - $this->genMirror(); - - $availableServer = array(); - foreach($this->mirrors as $mir){ - if(($mir['release'] == $this->FAIdebianRelease)&&($mir['section']==$this->FAIdebianSection)){ - $availableServer[$mir['mirror']]=$mir['mirror']; - } - } - - if($disableMirror){ - $availableServer[$mir['mirror']]=array("---"); - } - if(isset($_POST['Addpkg'])){ $this->dialog = new faiPackageEntry($this->config, $this->dn,$this->confDir.$this->FAIdebianMirror."/".$this->FAIdebianRelease."/".$this->FAIdebianSection,$this->usedPackages); $this->is_dialog =true; @@ -166,6 +173,21 @@ class faiPackage extends plugin $this->is_dialog=false; } } + + if(isset($_POST['Conpkg'])){ + $this->dialog = new faiPackageConfiguration($this->config, $this->dn,"none"); + $this->is_dialog =true; + } + + if(isset($_POST['SaveObjectConfig'])){ + $this->dialog = false; + $this->is_dialog=false; + } + + if(isset($_POST['CancelObjectConfig'])){ + $this->dialog = false; + $this->is_dialog=false; + } if($this->is_dialog){ return $this->dialog->execute(); @@ -217,14 +239,8 @@ class faiPackage extends plugin $this->sections[$section]=$section; if(empty($this->FAIdebianRelease)){ - $this->servers= array("---"); - } - if(empty($this->FAIdebianSection)){ - $this->releases= array("---"); + $this->sections= array("---"); } - if(empty($this->FAIdebianSection)){ - $this->FAIdebianSection = $section; - } $arr=array(); $arr['mirror'] = $mirror;