X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_MultiSelectWindow.inc;h=cf90a8d01284605c60424d83be2aa24e1a46d768;hb=d2a7f50083180fccb855c116a0f16cbca2636f62;hp=d50f410078326a1cf24ae246da14e87e1867c499;hpb=d00c540f49a26a2d62e481c4823cf775bdff0d43;p=gosa.git diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index d50f41007..cf90a8d01 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -34,6 +34,7 @@ class MultiSelectWindow{ var $HideFilterPart = false; var $SaveAdditionalVars = array(); // Additional Post vars to store + var $module= ""; function ClearElementsList() { @@ -72,9 +73,10 @@ class MultiSelectWindow{ } /* Contrucktion */ - function MultiSelectWindow($config,$filterName) + function MultiSelectWindow($config, $filterName, $module) { $this->config = $config; + $this->module = $module; $this->SaveButtonString = _("Save"); $this->CloseButtonString = _("Close"); $this->filterName = $filterName; @@ -271,9 +273,9 @@ class MultiSelectWindow{ /* Check if box is checked */ if($box['default'] == true){ - $boxes .=" ".$box['string']."
"; + $boxes .=" ".$box['string']."
"; }else{ - $boxes .=" ".$box['string']."
"; + $boxes .=" ".$box['string']."
"; } } $smarty->assign("CheckBoxes", $boxes); @@ -290,8 +292,8 @@ class MultiSelectWindow{ - + "; @@ -360,6 +362,11 @@ class MultiSelectWindow{ Store data also into a session var, to keep the checkboxes check after reload */ function save_object() { + /* Get up to date config */ + if(isset($this->parent->config)){ + $this->config = $this->parent->config; + } + /* Update current base */ if($this->DepartmentsAdded){ $s_action =""; @@ -486,7 +493,7 @@ class MultiSelectWindow{ /* Create header snapshot value */ function get_snapshot_header() { - $str = ""; + $str = " "; if($this->parent->snapshotEnabled()){ $ok = false; foreach($this->parent->get_used_snapshot_bases() as $base){ @@ -497,10 +504,10 @@ class MultiSelectWindow{ title='"._("Restore snapshopts of already deleted objects")."' alt='"._("Restore")."' name='RestoreDeletedSnapShot'> "; }else{ - $str = " "; + $str = " "; } - $str .= " "; +# $str .= " "; } return($str); } @@ -508,16 +515,18 @@ class MultiSelectWindow{ function GetSnapShotActions($dn) { - $str = ""; + $str= ""; if($this->parent->snapshotEnabled()){ - $str= " "; - if(count($this->parent->Available_SnapsShots($dn))){ - $str= " "; + } else { + $str = " "; } + + $str.= " "; } return($str); @@ -545,8 +554,8 @@ class MultiSelectWindow{ $this->departments = array(); /* Get all departments within this subtree */ - $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->ui->subtreeACL, - $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT); + $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + array("ou", "description"), GL_SIZELIMIT | GL_CONVERT); /* Edit delete link for system types */ @@ -565,6 +574,7 @@ class MultiSelectWindow{ /* Add deps to this dialog object list */ foreach($this->departments as $key=> $val){ + /* Add missing entries ... */ if(!isset($this->config->departments[trim($key)])){ $this->config->departments[trim($key)]="";