diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index 63f2dbb77d1af2113f53ec0a2532b2ff3838b067..a415e19e9ade5d4ef7638c602f28537667b44c05 100644 (file)
***************/
/* 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();
$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);
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"){
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);
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 */