mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
- syntax of link-entry widget (addressbook:id instead of just id)
- fixed loading of field translations
This commit is contained in:
parent
3e44e466c5
commit
d2ad639d3e
@ -55,10 +55,8 @@ class contact_widget
|
||||
function contact_widget($ui)
|
||||
{
|
||||
$this->ui = $ui;
|
||||
|
||||
if (!is_object($GLOBALS['egw']->contacts))
|
||||
{
|
||||
$GLOBALS['egw']->translation->add_app('addressbook');
|
||||
$GLOBALS['egw']->contacts =& CreateObject('phpgwapi.contacts');
|
||||
}
|
||||
$this->contacts =& $GLOBALS['egw']->contacts;
|
||||
@ -82,6 +80,8 @@ class contact_widget
|
||||
switch($cell['type'])
|
||||
{
|
||||
case 'contact-fields':
|
||||
$GLOBALS['egw']->translation->add_app('addressbook');
|
||||
$this->contacts->contacts();
|
||||
$cell['sel_options'] = $this->contacts->contact_fields;
|
||||
$cell['type'] = 'select';
|
||||
$cell['no_lang'] = 1;
|
||||
@ -89,6 +89,7 @@ class contact_widget
|
||||
|
||||
case 'contact-value':
|
||||
default:
|
||||
if (substr($value,0,12) == 'addressbook:') $value = substr($value,12); // link-entry syntax
|
||||
if (!$value || !$cell['size'] || (!is_array($this->contact) || $this->contact['id'] != $value) &&
|
||||
!($this->contact = $this->contacts->read($value)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user