mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
* Calendar: if contact is added as participant and event has not yet a title add contact as title
This commit is contained in:
parent
e01c5506e6
commit
38849094a9
@ -70,6 +70,16 @@ class calendar_uiforms extends calendar_ui
|
||||
{
|
||||
$extra_participants = $_GET['participants'] ? explode(',',$_GET['participants']) : array();
|
||||
|
||||
// if participant is a contact, add its link title as title
|
||||
foreach($extra_participants as $uid)
|
||||
{
|
||||
if ($uid[0] == 'c')
|
||||
{
|
||||
$title = egw_link::title('addressbook', substr($uid, 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['owner']))
|
||||
{
|
||||
$owner = $_GET['owner'];
|
||||
@ -175,6 +185,7 @@ class calendar_uiforms extends calendar_ui
|
||||
'public'=> $this->cal_prefs['default_private'] ? 0 : 1,
|
||||
'alarm' => $alarms,
|
||||
'recur_exception' => array(),
|
||||
'title' => $title ? $title : '',
|
||||
);
|
||||
}
|
||||
|
||||
@ -394,6 +405,11 @@ class calendar_uiforms extends calendar_ui
|
||||
$msg_permission_denied_added = true;
|
||||
}
|
||||
}
|
||||
// if participant is a contact and no title yet, add its link title as title
|
||||
if ($app == 'addressbook' && empty($event['title']))
|
||||
{
|
||||
$event['title'] = egw_link::title($app, substr($uid, 1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
// fall-through for accounts entered as contact
|
||||
@ -994,7 +1010,7 @@ class calendar_uiforms extends calendar_ui
|
||||
else
|
||||
{
|
||||
egw_framework::refresh_opener($msg, 'calendar', $content['id'], $button == 'save'?'update': 'delete');
|
||||
}
|
||||
}
|
||||
egw_framework::window_close();
|
||||
common::egw_exit();
|
||||
}
|
||||
|
@ -119,7 +119,7 @@
|
||||
<menupopup class="selectRole" id="role"/>
|
||||
</menulist>
|
||||
</vbox>
|
||||
<button align="center" label="Add" id="add" image="add" background_image="1"/>
|
||||
<button align="center" label="Add" id="add" image="add" background_image="1" novalidate="1"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row class="th gray">
|
||||
|
Loading…
Reference in New Issue
Block a user