From cc5ad42c27b97781e7843c28c8dbfa5c488b0d38 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Feb 2006 05:22:27 +0000 Subject: [PATCH] Added base select icon git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2751 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../departments/class_departmentGeneric.inc | 26 +++++++++++++++++++ plugins/admin/departments/generic.tpl | 1 + 2 files changed, 27 insertions(+) diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 62ceff126..3146f8a4c 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -78,6 +78,32 @@ class department extends plugin $this->config->make_idepartments(); $smarty= get_smarty(); + + /* 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()); + } + } + /* Hide all departments, that are subtrees of this department */ $bases = $this->config->idepartments; if(($this->dn == "new")||($this->dn == "")){ diff --git a/plugins/admin/departments/generic.tpl b/plugins/admin/departments/generic.tpl index aeb92d87c..a8538d394 100644 --- a/plugins/admin/departments/generic.tpl +++ b/plugins/admin/departments/generic.tpl @@ -30,6 +30,7 @@ + -- 2.30.2