From ca919944025e22e518d197fc54e047b3434b2d34 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 22 May 2006 07:44:28 +0000 Subject: [PATCH] Added baseslect to blocklists git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3482 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../blocklists/class_blocklistManagement.inc | 25 +++++++++++++++++++ plugins/gofax/blocklists/generic.tpl | 5 ++++ 2 files changed, 30 insertions(+) diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index bcb4c10d5..f5f523e8e 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -251,6 +251,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"){ diff --git a/plugins/gofax/blocklists/generic.tpl b/plugins/gofax/blocklists/generic.tpl index d34a84df2..00e945a53 100644 --- a/plugins/gofax/blocklists/generic.tpl +++ b/plugins/gofax/blocklists/generic.tpl @@ -17,6 +17,11 @@ {html_options options=$bases selected=$base_select} + {if $selectmode == ""} + + {else} + + {/if} -- 2.30.2