mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
* Calendar/Mail: tell user if an event has been already already deleted when viewing a meeting request
This commit is contained in:
parent
8d4c7cc906
commit
c560fe084e
@ -328,7 +328,6 @@ class calendar_so
|
||||
{
|
||||
// We want only the parents to match
|
||||
$where['cal_uid'] = $ids;
|
||||
$where[] = 'cal_deleted IS NULL';
|
||||
if ($read_recurrence)
|
||||
{
|
||||
$where['cal_recurrence'] = $recur_date;
|
||||
|
@ -2054,7 +2054,7 @@ class calendar_uiforms extends calendar_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = lang('Status already applied');
|
||||
$event['error'] = lang('Status already applied');
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2065,17 +2065,17 @@ class calendar_uiforms extends calendar_ui
|
||||
if (strtolower($ical_method) == 'response' && isset($existing_event['participants'][$user]) &&
|
||||
$status != 'U' && isset($this->bo->verbose_status[$status]))
|
||||
{
|
||||
$msg = lang('You already replied to this invitation with').': '.lang($this->bo->verbose_status[$status]);
|
||||
$event['error'] = lang('You already replied to this invitation with').': '.lang($this->bo->verbose_status[$status]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = lang('Using already existing event on server.');
|
||||
$event['error'] = lang('Using already existing event on server.');
|
||||
}
|
||||
$user_and_memberships = $GLOBALS['egw']->accounts->memberships($user, true);
|
||||
$user_and_memberships[] = $user;
|
||||
if (!array_intersect(array_keys($event['participants']), $user_and_memberships))
|
||||
{
|
||||
$msg .= ($msg ? "\n" : '').lang('You are not invited to that event!');
|
||||
$event['error'] .= ($event['error'] ? "\n" : '').lang('You are not invited to that event!');
|
||||
if ($event['id'])
|
||||
{
|
||||
$readonlys['button[accept]'] = $readonlys['button[tentativ]'] =
|
||||
@ -2102,11 +2102,28 @@ class calendar_uiforms extends calendar_ui
|
||||
$event['recure'] = $this->bo->recure2string($event);
|
||||
$event['all_participants'] = implode(",\n",$this->bo->participants($event, true));
|
||||
|
||||
// EGroupware event has been deleted, dont let user resurect it by accepting again
|
||||
if ($existing_event && $existing_event['deleted'] && strtolower($ical_method) !== 'cancel')
|
||||
{
|
||||
// check if this is an EGroupware event or has an external organizer
|
||||
foreach($existing_event['participants'] as $uid => $status)
|
||||
{
|
||||
$quantity = $role = null;
|
||||
calendar_so::split_status($status, $quantity, $role);
|
||||
if (!is_numeric($uid) && $role == 'CHAIR') break;
|
||||
}
|
||||
if (!(!is_numeric($uid) && $role == 'CHAIR'))
|
||||
{
|
||||
$event['error'] = lang('Event has been deleted by organizer!');
|
||||
$readonlys['button[accept]'] = $readonlys['button[tentativ]'] =
|
||||
$readonlys['button[reject]'] = $readonlys['button[cancel]'] = true;
|
||||
}
|
||||
}
|
||||
// ignore events in the past (for recurring events check enddate!)
|
||||
if ($this->bo->date2ts($event['start']) < $this->bo->now_su &&
|
||||
elseif ($this->bo->date2ts($event['start']) < $this->bo->now_su &&
|
||||
(!$event['recur_type'] || $event['recur_enddate'] && $event['recur_enddate'] < $this->bo->now_su))
|
||||
{
|
||||
$msg = lang('Requested meeting is in the past!');
|
||||
$event['error'] = lang('Requested meeting is in the past!');
|
||||
$readonlys['button[accept]'] = $readonlys['button[tentativ]'] =
|
||||
$readonlys['button[reject]'] = $readonlys['button[cancel]'] = true;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="calendar.meeting" template="" lang="" group="0" version="1.9.002">
|
||||
<description id="msg" class="message leftPad5"/>
|
||||
<grid border="0">
|
||||
<grid border="0" width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@ics_method=request">
|
||||
@ -19,6 +19,7 @@
|
||||
<button label="Tentative" id="button[tentativ]" class="leftPad5"/>
|
||||
<button label="Reject" id="button[reject]" class="leftPad5"/>
|
||||
<buttononly statustext="Edit event in calendar" label="Edit" id="button[edit]" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&cal_id=$cont[id]'),'_blank','dependent=yes,width=750,height=410,scrollbars=yes,status=yes'); return false;" class="leftPad5"/>
|
||||
<description id="error" class="meetingRequestError" align="right"/>
|
||||
</row>
|
||||
<row disabled="!@ics_method=reply">
|
||||
<description value="This mail contains a reply to a meeting request" class="meetingRequestMessage"/>
|
||||
@ -26,6 +27,7 @@
|
||||
<description/>
|
||||
<description/>
|
||||
<description/>
|
||||
<description id="error" class="meetingRequestError" align="right"/>
|
||||
</row>
|
||||
<row disabled="!@ics_method=cancel">
|
||||
<description value="This mail cancels a meeting" class="meetingRequestMessage"/>
|
||||
@ -33,6 +35,7 @@
|
||||
<description/>
|
||||
<description/>
|
||||
<description/>
|
||||
<description id="error" class="meetingRequestError" align="right"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -104,7 +107,11 @@ table.meetingRequest {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
|
||||
.meetingRequestError {
|
||||
color: red;
|
||||
font-style: italic;
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
</styles>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user