From c192a6c0034c1f9b1a642fc27634bd34108ad16c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Mar 2008 06:50:53 +0000 Subject: [PATCH] Simply prepared daemon event notify. -Not working git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9272 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gotomasses/events/DaemonEvent_notify.tpl | 39 +++++++++---------- .../events/class_DaemonEvent_notify.inc | 30 +++++++------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl index 4e3fc127d..25a8618ef 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl +++ b/gosa-plugins/goto/addons/gotomasses/events/DaemonEvent_notify.tpl @@ -3,24 +3,25 @@ - + + + + - + + + + + +
- - - - - -
{t}Timestamp{/t}{$timestamp}
+
{t}Send on:{/t}{$timestamp}
+ {t}Subject{/t} - - - - -
- {t}Target objects{/t} -
- {$target_list} -
+
+ +
+ {t}Text{/t} +
+
@@ -53,10 +54,6 @@ - - -
- diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc index 08e0c87f5..73174bf20 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent_notify.inc @@ -4,31 +4,27 @@ class DaemonEvent_notify extends DaemonEvent public function __construct($config,$data = array()) { DaemonEvent::__construct($config,$data); - $this->s_Menu_Name = _("Send message"); - $this->s_Event_Name = _("Send message"); + $this->s_Menu_Name = _("Notify"); + $this->s_Event_Name = _("Notify"); $this->s_Schedule_Action = "job_trigger_action_notify"; $this->s_Trigger_Action= "job_trigger_action_notify"; $this->s_Queued_Action= "trigger_action_notify"; - $this->s_Menu_Image = "images/mailto.png"; - $this->s_List_Image = "images/mailto.png"; + $this->s_Menu_Image = "images/status_stopped.png"; + $this->s_List_Image = "images/status_stopped.png"; + + $this->a_targets = array("GOsa"); } public function execute() { DaemonEvent::execute(); - $display = $this->get_header(); - $tmp = $this->data; - - /* Check if target add dialog is open */ - if($this->is_target_list_open() && $this->is_new){ - return($this->get_target_add_list()); - } - $smarty = get_smarty(); + $smarty->assign("subject" ,"subject"); + $smarty->assign("message" ,"message"); + $smarty->assign("data" , $this->data); $smarty->assign("data" , $this->data); - $smarty->assign("target_list" , $this->get_target_list()); $smarty->assign("is_new" , $this->is_new); $smarty->assign("timestamp" , $this->get_time_select()); $display.= $smarty->fetch(get_template_path('DaemonEvent_notify.tpl', TRUE, dirname(__FILE__))); @@ -40,6 +36,14 @@ class DaemonEvent_notify extends DaemonEvent { DaemonEvent::save_object(); } + + public function save() + { + $ret = DaemonEvent::save(); + $ret['user'] = array("test","asdf"); + print_a($ret); + return($ret); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2