From 8f0a3f42fe3c07ee93173ce3c7a913ef982343a9 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 22 May 2006 07:30:22 +0000 Subject: [PATCH] Added baseACL and base select dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3480 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_phoneConferenceGeneric.inc | 26 +++++++++++++++++++ plugins/gofon/conference/generic.tpl | 5 ++++ 2 files changed, 31 insertions(+) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index ab70ac5fb..49f08c236 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -54,6 +54,8 @@ class conference extends plugin var $last_dep_sorting= "invalid"; var $departments= array(); + var $dialog ; + /* attribute list for save action */ var $attributes= array("cn","base", "description", "goFonPIN","goFonConferenceOption_P","goFonConferenceOption_r", "goFonConferenceOption_M","goFonConferenceOption_s","goFonConferenceOption_i","goFonConferenceOption_c", @@ -119,6 +121,30 @@ class conference extends plugin $smarty->assign("bases" ,$this->config->idepartments); $smarty->assign("base" ,$this->base); + $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()); + } + } + $smarty->assign("goFonConferenceOptions", array("D"=>"Conference ","d"=>"Conference without PIN")); $smarty->assign("goFonConferenceOptionFormats", array("WAV"=>"Wave","GSM"=>"GSM","WAV49"=>"Wave49")); $smarty->assign("goFonConferenceOption", $this->goFonConferenceOption_D); diff --git a/plugins/gofon/conference/generic.tpl b/plugins/gofon/conference/generic.tpl index 0ba84c1ec..f7b25a2d2 100644 --- a/plugins/gofon/conference/generic.tpl +++ b/plugins/gofon/conference/generic.tpl @@ -35,6 +35,11 @@ + {if $baseACL == ""} + + {else} + + {/if} -- 2.30.2