mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-01 00:31:42 +01:00
some fixes for the contactform: customfields, not working mail-subject, ...
This commit is contained in:
parent
e54535cfc8
commit
1557afe792
@ -54,6 +54,8 @@ class addressbook_contactform
|
|||||||
}
|
}
|
||||||
if ($contact->save($content))
|
if ($contact->save($content))
|
||||||
{
|
{
|
||||||
|
unset($content['modified']); unset($content['modifier']); // not interesting for new entries
|
||||||
|
|
||||||
$tracking->do_notifications($content,null); // only necessary as long addressbook is not doing this itself
|
$tracking->do_notifications($content,null); // only necessary as long addressbook is not doing this itself
|
||||||
|
|
||||||
return '<p align="center">'.$content['msg'].'</p>';
|
return '<p align="center">'.$content['msg'].'</p>';
|
||||||
|
@ -142,7 +142,7 @@ class addressbook_tracking extends bo_tracking
|
|||||||
{
|
{
|
||||||
$prefix = ($data['subject_contactform'] ? $data['subject_contactform'] : lang('Contactform')).': ';
|
$prefix = ($data['subject_contactform'] ? $data['subject_contactform'] : lang('Contactform')).': ';
|
||||||
}
|
}
|
||||||
return $prefix.parent::get_subject($data,$old);
|
return $prefix.$this->contacts->link_title($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,7 +162,7 @@ class addressbook_tracking extends bo_tracking
|
|||||||
switch($name)
|
switch($name)
|
||||||
{
|
{
|
||||||
case 'n_prefix': case 'n_given': case 'n_middle': case 'n_family': case 'n_suffix': // already in n_fn
|
case 'n_prefix': case 'n_given': case 'n_middle': case 'n_family': case 'n_suffix': // already in n_fn
|
||||||
case 'tid':
|
case 'n_fileas': case 'id': case 'tid':
|
||||||
break;
|
break;
|
||||||
case 'created': case 'modified':
|
case 'created': case 'modified':
|
||||||
$details[$name] = array(
|
$details[$name] = array(
|
||||||
@ -214,6 +214,18 @@ class addressbook_tracking extends bo_tracking
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->contacts->customfields)
|
||||||
|
{
|
||||||
|
foreach($this->contacts->customfields as $name => $custom)
|
||||||
|
{
|
||||||
|
if (!$data['#'.$name]) continue;
|
||||||
|
|
||||||
|
$details['#'.$name] = array(
|
||||||
|
'label' => $custom['label'],
|
||||||
|
'value' => $data['#'.$name],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
return $details;
|
return $details;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user