X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Faddons%2Fgotomasses%2Fevents%2Fclass_DaemonEvent.inc;h=d62f9014e2b5d55a03e3b44f154e2ae1071a64bb;hb=d2c3776f75c3339392ce24fac8c6b0d40031afdd;hp=e742f18867eb20d44176a648ef382dbec0a9132a;hpb=ec8864dddb2b51d05ae4d0c06486ab8c72e476ca;p=gosa.git diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc index e742f1886..d62f9014e 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc @@ -35,6 +35,8 @@ class DaemonEvent protected $time_select_used = FALSE; // Indicates that we have used the timestamp select boxes. protected $target_list_used = FALSE; // Indicates that the target list was used. + protected $target_divlist = FALSE; // The divlist used by the target add dialog + public function __construct($config,$data = array()) { $this->data = $data; @@ -141,6 +143,16 @@ class DaemonEvent { $this->target_list_used = TRUE; $smarty = get_smarty(); + + if(!$this->target_divlist){ + $this->target_divlist = new MultiSelectWindow($this->config,"EventTargets","gotomasses"); + $this->target_divlist->SetSummary(_("Targets")); + $this->target_divlist->SetInformation(_("This dialog shows all available targets for your event, check the targets you want to add and use the 'Use' button to accept.")); + $this->target_divlist->EnableCloseButton(FALSE); + $this->target_divlist->EnableSaveButton(FALSE); + } + + $smarty->assign("divlist",$this->target_divlist->Draw()); return($smarty->fetch(get_template_path('target_list.tpl', TRUE, dirname(__FILE__)))); } @@ -150,13 +162,18 @@ class DaemonEvent if(isset($_POST['open_target_list'])){ $this->target_list_used =TRUE; } + if($this->target_divlist){ + $this->target_divlist->save_object(); + } if($this->target_list_used){ if(isset($_POST['abort_target_dialog'])){ $this->target_list_used =FALSE; + $this->target_divlist = FALSE; } if(isset($_POST['save_target_dialog'])){ $this->target_list_used =FALSE; echo "Targets auslesen"; + $this->target_divlist = FALSE; } }