diff --git a/api/src/Contacts/Photo.php b/api/src/Contacts/Photo.php index 7f43231f98..dc185798dc 100644 --- a/api/src/Contacts/Photo.php +++ b/api/src/Contacts/Photo.php @@ -108,8 +108,8 @@ class Photo return 'https://gravatar.com/'.md5(trim(strtolower($this->contact))); } return Api\Framework::getUrl(Api\Egw::link('/api/anon_lavatar.php', [ - 'firstname' => $this->contact['firstname'], - 'lastname' => $this->contact['lastname'], + 'firstname' => $this->contact['n_given'], + 'lastname' => $this->contact['n_family'], 'id' => $this->contact['id'], ])); } diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index d12b0525bf..9973f55592 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -250,7 +250,7 @@ class calendar_boupdate extends calendar_bo { $event['##videoconference'] = EGroupware\Status\Videoconference\Call::genUniqueRoomID(); } - elseif(empty($event['videoconference'])) + elseif (isset($event['videoconference']) && !$event['videoconference']) { $event['##videoconference'] = ''; } @@ -964,7 +964,7 @@ class calendar_boupdate extends calendar_bo continue; // dont notify rejected participants or groups } - if($userid != $GLOBALS['egw_info']['user']['account_id'] || + if ($userid != $GLOBALS['egw_info']['user']['account_id'] || ($userid == $GLOBALS['egw_info']['user']['account_id'] && $user_prefs['calendar']['receive_own_updates']==1) || $msg_type == MSG_ALARM) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 1f5f506f62..1d0f299642 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -241,13 +241,25 @@ class calendar_uiforms extends calendar_ui $offset = 60 * $this->cal_prefs[$alarm_pref]; $alarms[1] = array( 'default' => 1, - 'offset' => $offset , + 'offset' => $offset, 'time' => $start - $offset, 'all' => false, 'owner' => $owner, 'id' => 1, ); } + // add automatic alarm 5min before videoconference for all participants + if (!empty($_GET['videoconference'])) + { + $offset = -5 * 60; + $alarms[1+count($alarms)] = array( + 'offset' => $offset, + 'time' => $start - $offset, + 'all' => true, + 'owner' => $owner, + 'id' => 2, + ); + } return array( 'participant_types' => $participant_types, diff --git a/calendar/js/app.js b/calendar/js/app.js index b0a6ecfee7..ef70eb3e06 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -4180,6 +4180,25 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( } } } + }, + + /** + * Videoconference checkbox checked + */ + videoconferenceOnChange: function() + { + let widget = this.et2.getWidgetById('videoconference'); + + if (widget && widget.get_value()) + { + // notify all participants + this.et2.getWidgetById('participants[notify_externals]').set_value('yes'); + + // add alarm for all participants 5min before videoconference + this.et2.getWidgetById('new_alarm[options]').set_value('300'); + this.et2.getWidgetById('new_alarm[owner]').set_value('0'); // all participants + this.et2.getWidgetById('button[add_alarm]').click(); + } } });}).call(this); diff --git a/calendar/templates/default/edit.xet b/calendar/templates/default/edit.xet index 0c765c776d..e9dac0c640 100644 --- a/calendar/templates/default/edit.xet +++ b/calendar/templates/default/edit.xet @@ -233,7 +233,7 @@