mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-21 05:19:24 +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
7d5ed49395
commit
fe181bcf82
@ -70,6 +70,16 @@ class calendar_uiforms extends calendar_ui
|
|||||||
{
|
{
|
||||||
$extra_participants = $_GET['participants'] ? explode(',',$_GET['participants']) : array();
|
$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']))
|
if (isset($_GET['owner']))
|
||||||
{
|
{
|
||||||
$owner = $_GET['owner'];
|
$owner = $_GET['owner'];
|
||||||
@ -175,6 +185,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
'public'=> $this->cal_prefs['default_private'] ? 0 : 1,
|
'public'=> $this->cal_prefs['default_private'] ? 0 : 1,
|
||||||
'alarm' => $alarms,
|
'alarm' => $alarms,
|
||||||
'recur_exception' => array(),
|
'recur_exception' => array(),
|
||||||
|
'title' => $title ? $title : '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,6 +405,11 @@ class calendar_uiforms extends calendar_ui
|
|||||||
$msg_permission_denied_added = true;
|
$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;
|
break;
|
||||||
}
|
}
|
||||||
// fall-through for accounts entered as contact
|
// fall-through for accounts entered as contact
|
||||||
@ -994,7 +1010,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
egw_framework::refresh_opener($msg, 'calendar', $content['id'], $button == 'save'?'update': 'delete');
|
egw_framework::refresh_opener($msg, 'calendar', $content['id'], $button == 'save'?'update': 'delete');
|
||||||
}
|
}
|
||||||
egw_framework::window_close();
|
egw_framework::window_close();
|
||||||
common::egw_exit();
|
common::egw_exit();
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
<menupopup class="selectRole" id="role"/>
|
<menupopup class="selectRole" id="role"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
</vbox>
|
</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/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row class="th gray">
|
<row class="th gray">
|
||||||
|
Loading…
Reference in New Issue
Block a user