summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4aac7a3)
raw | patch | inline | side by side (parent: 4aac7a3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 12:32:09 +0000 (12:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Apr 2008 12:32:09 +0000 (12:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10745 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl | patch | blob | history | |
gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl b/gosa-plugins/goto/addons/goto/events/DaemonEvent_notify.tpl
index 1499e46fa1e7a1dd9328fef4f8ed5ef9c924b3e6..479dafb61409ee02ee33773aae4c7c53c56863fa 100644 (file)
<td style='width:50%; vertical-align:top; border-right:1px solid #AAA'>
<b>{t}Message settings{/t}</b>
<table style="width:100%;">
+ <tr>
+ <td>{t}Sender{/t}</td>
+ <td><input type='text' name="from" value="{$from}" style="width:100%;"></td>
+ </tr>
<tr>
<td>{t}Subject{/t}</td>
<td><input type='text' name="subject" value="{$subject}" style="width:100%;"></td>
diff --git a/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc b/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc
index 0f0365bc9c057efd1a66ad73eabffd54856c87f4..16a2796f9e96518f62170681655347d1dc52bfd2 100644 (file)
var $message = "";
var $subject = "";
+ var $from = "";
public function __construct($config,$data = array())
{
DaemonEvent::__construct($config,$data);
+
+ $ui = get_userinfo();
+ $this->from = $ui->cn;
+
+ $this->message = base64_decode($this->message);
+
$this->s_Menu_Name = _("Send message");
$this->s_Event_Name = _("Send message");
$display = $this->get_header();
$tmp = $this->data;
$smarty = get_smarty();
- $smarty->assign("subject" ,"subject");
- $smarty->assign("message" ,"message");
$smarty->assign("data" , $this->data);
$smarty->assign("is_new" , $this->is_new);
$smarty->assign("timestamp" , $this->get_time_select());
$smarty->assign("add_str", msgPool::addButton(_("Target")));
$smarty->assign("del_str", msgPool::delButton(_("Target")));
+ $smarty->assign("from", xmlentities($this->from));
$smarty->assign("subject", xmlentities($this->subject));
$smarty->assign("message", xmlentities($this->message));
if(empty($this->message)){
$msgs[] = msgPool::required(_("Message"));
}
+ if(empty($this->from)){
+ $msgs[] = msgPool::required(_("From"));
+ }
if(!count($this->groups) && !count($this->users)){
$msgs[] = msgPool::required(_("Target"));
}
if(isset($_POST['message'])){
$this->message = get_post('message');
}
+ if(isset($_POST['from'])){
+ $this->from = get_post('from');
+ }
}
public function add_users($targets)
$ret['users'] = array_values($this->users);
$ret['groups'] = array_values($this->groups);
$ret['subject'] = $this->subject;
- $ret['message'] = $this->message;
+ $ret['from'] = $this->from;
+ $ret['message'] = base64_encode($this->message);
return($ret);
}
}