summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9131c26)
raw | patch | inline | side by side (parent: 9131c26)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Oct 2005 09:41:54 +0000 (09:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 17 Oct 2005 09:41:54 +0000 (09:41 +0000) |
Check for partition table entries.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1581 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1581 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationStartup.inc | patch | blob | history | |
plugins/admin/systems/workstationStartup.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index f9548a12c6657a4bb99e2be759f3da5c2ac758c2..b994a16c5eb57960260bd7df5516e0540ca23a71 100644 (file)
}
/* FAI class management */
-
if((isset($_POST['AddClass']))&&(isset($_POST['FAIclassesSel']))){
- $this->FAIclass[$_POST['FAIclassesSel']]=$_POST['FAIclassesSel'];
- }
+ $found = 0 ;
+
+ foreach($this->FAIclass as $name){
+ if(isset($this->FAIclassInfo[$name])){
+ foreach($this->FAIclassInfo[$name] as $atr){
+ if($atr['obj'] == "FAIpartitionTable"){
+ $found ++ ;
+ }
+ }
+ }
+ }
+
+ if((isset($this->FAIclassInfo[$_POST['FAIclassesSel']]['FAIpackageList']))&&($found>0)){
+ print_red(_("There is already a profile in your selection that contain partition table configuratons."));
+ }else{
+ $this->FAIclass[$_POST['FAIclassesSel']]=$_POST['FAIclassesSel'];
+ }
+ }
if((isset($_POST['DelClass']))&&(isset($_POST['FAIclassSel']))){
if(isset($this->FAIclass[$_POST['FAIclassSel']])){
}
}
-
-
-
-
-
-
-
-
-
/* Show main page */
$smarty= get_smarty();
foreach($this->FAIclass as $class){
$tmp[] = $class;
}
- $this->FAIclass = $tmp;
+ $this->attrs['FAIclass'] = $tmp;
/* Write back to ldap */
-
+
+ if(count($this->attrs['FAIclass'])==0){
+ $tmp = array();
+ foreach($this->attrs['objectClass'] as $class){
+ if($class != "FAIobject"){
+ $tmp[] = $class;
+ }
+ }
+ $this->attrs['objectClass'] = $tmp;
+ $this->attrs['FAIclass'] = array();;
+ }
+
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl
index 3c0bd3edfbb0be8fd1f0624d352497c9228a206e..2fcb2918c1990d98e4639c5366ed7b4ff4a1a228 100644 (file)
<td style="vertical-align:top;">
{t}Assigned FAI classes{/t}<br>
- <select name="FAIclassSel" {$FAIclassACL} multiple style="width:200px;height:50px;">
+ <select name="FAIclassSel" {$FAIclassACL} multiple style="width:280px;height:100px;">
{html_options values=$FAIclass output=$FAIclassKeys}
<option disabled> </option>
</select>