summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b87877)
raw | patch | inline | side by side (parent: 1b87877)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Oct 2005 11:31:32 +0000 (11:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Oct 2005 11:31:32 +0000 (11:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1507 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiPackage.inc | patch | blob | history | |
plugins/admin/fai/faiPackage.tpl | patch | blob | history |
index 7be3e011b819b63c557feae83e7dfc4549f13c29..dc22f0a0fdbab5db7fa7f644e93b530140894608 100644 (file)
var $sections = array(); // All possible sections
var $releases = array(); // All release types
+ var $disableRepository = false;
+
var $mirrors = array(); // The combination of server/section/release
var $confDir = "";
var $usedPackages = array();
$this->dn =$dn;
}
+ if(isset($this->attrs['FAIdebianRelease'])){
+ $this->disableRepository=true;
+ }
+
unset($this->attrs['FAIpackage']['count']);
foreach($this->attrs['FAIpackage'] as $pkg){
$this->usedPackages[$pkg] = $pkg;
$this->dialog = new faiPackageEntry($this->config, $this->dn,$this->confDir.$this->mirror."/".$this->section."/".$this->release,$this->usedPackages);
$this->is_dialog =true;
}
-
+
+ if(isset($_POST['Delpkg'])){
+ unset($this->usedPackages[$_POST['usedPackages']]);
+ }
+
if(isset($_POST['CancelSubObject'])){
$this->dialog = false;
$this->is_dialog=false;
$this->usedPackages = $use;
$this->dialog = false;
$this->is_dialog=false;
+ $this->disableRepository =true;
}
}
return $this->dialog->execute();
}
-
+ if($this->disableRepository == true){
+ $smarty->assign("mirrorACL" ," disabled ");
+ $smarty->assign("sectionACL" ," disabled ");
+ $smarty->assign("releaseACL" ," disabled ");
+ }else{
+ $smarty->assign("mirrorACL" ,"");
+ $smarty->assign("sectionACL" ,"");
+ $smarty->assign("releaseACL" ,"");
+ }
$smarty->assign("mirrors" ,$availableServer);
$smarty->assign("mirror" ,$this->FAIdebianMirror);
$smarty->assign("sections",$this->sections);
function check()
{
$message= array();
- $str = utf8_encode("üöä");
- if((preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){
- $message[]=_("Please enter a valid description.");
+
+ if((empty($this->FAIdebianSection))||(empty($this->FAIdebianRelease))||(empty($this->FAIdebianMirror))){
+ $message[]=_("Please choose a valid combination for your repository setup.");
}
+
return ($message);
}
index cb64820349ebe2dbe4207c7454fb09364a4b4323..66f38f0adf64368a7c76bc454c00325aa13449d2 100644 (file)
</LABEL>
</td>
<td>
- <select name="FAIdebianSection" title="{t}section{/t}">
+ <select name="FAIdebianSection" title="{t}section{/t}" {$sectionACL}>
{html_options options=$sections selected=$section}
</select>
<input type="submit" value="{t}refresh{/t}" name="refresh1">
</LABEL>
</td>
<td>
- <select name="FAIdebianRelease" title="{t}release{/t}">
+ <select name="FAIdebianRelease" title="{t}release{/t}" {$releaseACL}>
{html_options options=$releases selected=$release}
</select>
<input type="submit" value="{t}refresh{/t}" name="refresh2">
</LABEL>
</td>
<td>
- <select name="FAIdebianMirror" title="{t}mirror{/t}">
+ <select name="FAIdebianMirror" title="{t}mirror{/t}" {$mirrorACL}>
{html_options options=$mirrors selected=$mirror}
</select>
<input type="submit" value="{t}refresh{/t}" name="refresh3">