diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 2a3ce0c3b6..a74a6d80a9 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -25,6 +25,7 @@ define('MSG_ACCEPTED',5); define('MSG_ALARM',6); define('MSG_DISINVITE',7); define('MSG_DELEGATED',8); +define('MSG_REQUEST',9); /** * Class to access AND manipulate all calendar data (business object) @@ -810,6 +811,9 @@ class calendar_boupdate extends calendar_bo $action = 'Alarm'; $pref = 'Alarm'; break; + case MSG_REQUEST: + $method = 'REQUEST'; + break; default: $method = 'PUBLISH'; } diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index e5e67499bc..efa03bdc0c 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -3482,12 +3482,18 @@ class calendar_uiforms extends calendar_ui return $this->process_edit($event); } + /** + * Immediately send notification to selected users + * + * @param array $content + * @throws Api\Exception\AssertionFailed + */ public function notify($content=array()) { if(is_array($content) && $content['button']) { $participants = array_filter($content['participants']['notify']); - $this->bo->_send_update(MSG_ALARM,$participants,$content,null,0,null,true); + $this->bo->send_update(MSG_REQUEST,$participants,$content,null,0,null,true); Framework::window_close(); } @@ -3505,8 +3511,6 @@ class calendar_uiforms extends calendar_ui ); $readonlys = []; - - $etpl = new Etemplate('calendar.notify_dialog'); $preserve = $content; diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index b4b576aec0..52ecbf0ca9 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -963,15 +963,6 @@ class calendar_uilist extends calendar_ui 'hint' => 'Do not notify of these changes', 'group' => $group, ), - 'notifications' => array( - 'caption' => 'Send notifications', - 'hint' => 'Send notifications to users right now', - 'url' => 'calendar.calendar_uiforms.notify&id=$app_id', - 'popup' => Link::get_registry('calendar', 'view_popup'), - 'allowOnMultiple' => false, - 'group' => $group, - 'disableClass' => 'rowNoView', - ) ); $status = array_map('lang',$this->bo->verbose_status); unset($status['G']); @@ -1051,6 +1042,16 @@ class calendar_uilist extends calendar_ui ); } + $actions['notifications'] = array( + 'caption' => 'Send notifications', + 'hint' => 'Send notifications to users right now', + 'icon' => 'notifications/navbar', + 'url' => 'calendar.calendar_uiforms.notify&id=$app_id', + 'popup' => Link::get_registry('calendar', 'view_popup'), + 'allowOnMultiple' => false, + 'group' => $group, + 'disableClass' => 'rowNoView', + ); if ($GLOBALS['egw_info']['user']['apps']['timesheet']) { $actions['timesheet'] = array( // interactive add for a single event