index 4a68f3ecbf90c6458d60a5a55a432c3b4efedd5c..b6fc3e3998109230811f1d9c1d9bab9b5311603f 100644 (file)
/* Add SubSearch checkbox */
//$this->AddCheckBox(SEPERATOR);
- //$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false);
+ //$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Search in subtrees"), false);
/* Name ,Text ,Default , Connect with alphabet */
$this->AddRegex ("Regex", _("Display users matching"),"*" , true);
}
- function AddUserBoxToFilter($position){
+ function AddUserBoxToFilter($position)
+ {
$str = "";
if($position == 2){
+
+ /* Check if there are post commands available for fai management.
+ * If not, grey out freeze/branch and release remove buttons.
+ */
+ $r = ("" != search_config($this->config->data,"faiManagement","POSTREMOVE"));
+ $c = ("" != search_config($this->config->data,"faiManagement","POSTCREATE"));
+
$smarty = get_smarty();
+ $smarty->assign("allow_create", $c);
+ $smarty->assign("allow_remove", $r);
$smarty->assign("selectedBranch",$this->selectedBranch);
$smarty->assign("branchimage","images/branch.png");
$smarty->assign("branches",$this->AvailableBranches);
$base = $this->config->current['BASE'];
/* Add base */
- $deps[] = array("dn"=>$this->config->current['BASE']);
- $deps= array_merge($deps,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+ $tmp = array();
+ $tmp[] = array("dn"=>$this->config->current['BASE']);
+ $tmp= array_merge($tmp,get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH));
+ $deps = array();
+ foreach($tmp as $tm){
+ $deps[$tm['dn']] = $tm['dn'];
+ }
+
/* Load possible departments */
$ui= get_userinfo();
$tdeps= $ui->get_module_departments("fai");
$ids = $this->config->idepartments;
- foreach($deps as $dep){
- if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
+ $first = "";
+ $found = FALSE;
+ foreach($ids as $dep => $name){
+ if(isset($deps[$dep]) && in_array_ics($dep, $tdeps)){
/* Keep first base dn in mind, we could need this
* info if no valid base was found
if(empty($first)) {
$first = $dep['dn'];
}
-
- $value = $ids[$dep['dn']];
- if ($this->selectedBase == $dep['dn']){
+
+ $value = $ids[$dep];
+ if ($this->selectedBase == $dep){
$found = TRUE;
- $options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
+ $options.= "<option selected='selected' value='".$dep."'>$value</option>";
} else {
- $options.= "<option value='".$dep['dn']."'>$value</option>";
+ $options.= "<option value='".$dep."'>$value</option>";
}
}
}
$listhead .= " <input class='center' type='image' align='middle' src='images/edittrash.png'
title='"._("Remove selected fai objects")."' alt='"._("Remove fai objects")."' name='remove_multiple_fai_objects'> ";
+ /* Add multiple copy & cut icons */
+ if(is_object($this->parent->CopyPasteHandler)){
+ $listhead .= " <input class='center' type='image' align='middle' src='images/editcopy.png'
+ title='"._("Copy selected objects")."' alt='"._("Copy fai objects")."' name='multiple_copy_fai'> ";
+ $listhead .= " <input class='center' type='image' align='middle' src='images/editcut.png'
+ title='"._("cut selected objects")."' alt='"._("Cut fai objects")."' name='multiple_cut_fai'> ";
+ $listhead .= "</div>";
+ }
+
$listhead .="</div>";;