X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fgofax%2Fblocklists%2Fclass_blocklistManagement.inc;h=a415e19e9ade5d4ef7638c602f28537667b44c05;hb=554ac877fe40fc7b46328fab620380029c278003;hp=63f2dbb77d1af2113f53ec0a2532b2ff3838b067;hpb=9b24877b4c1ed66e83811b545b94335ba8a21c33;p=gosa.git diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index 63f2dbb77..a415e19e9 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -221,7 +221,7 @@ class blocklist extends plugin ***************/ /* What about finish? */ - if ((isset($_POST['edit_finish'])) && (!empty($this->dn))){ + if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (!empty($this->dn))){ $message= $this->check(); $this->remove_lock(); @@ -235,9 +235,12 @@ class blocklist extends plugin $this->save (); gosa_log ("Blocklist object'".$this->dn."' has been saved"); - $this->dn= ""; - del_lock ($this->ui->dn); - unset($_SESSION['objectinfo']); + + if (!isset($_POST['edit_apply'])){ + $this->dn= ""; + del_lock ($this->ui->dn); + unset($_SESSION['objectinfo']); + } } else { /* Errors found, show message */ show_errors ($message); @@ -251,6 +254,31 @@ class blocklist extends plugin if($this->dn){ + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Set base */ if ($this->base == ""){ if ($this->dn == "new"){ @@ -268,9 +296,11 @@ class blocklist extends plugin if ($this->dn == "new" || preg_match ("/,ou=incoming,/", $this->dn)){ $smarty->assign("selectmode", ""); $smarty->assign("mode", ""); + $smarty->assign("apply", "0"); } else { $smarty->assign("selectmode", "disabled"); $smarty->assign("mode", "readonly"); + $smarty->assign("apply", "1"); } foreach(array("cn", "description", "type", "goFaxBlocklist") as $val){ $smarty->assign("$val", $this->$val); @@ -291,7 +321,14 @@ class blocklist extends plugin Divlist dialog ***************/ + /* Check if there is a snapshot dialog open */ + if($str = $this->showSnapshotDialog($this->DivListBlocklist->selectedBase, + array("ou=gofax,ou=systems,". $this->DivListBlocklist->selectedBase))){ + return($str); + } + /* Display dialog with system list */ + $this->DivListBlocklist->parent = $this; $this->DivListBlocklist->execute(); /* Add departments if subsearch is disabled */