forked from extern/egroupware
added paramter to select, if sender gets also an email via contactform
This commit is contained in:
parent
0c7521cecf
commit
7eed120731
@ -26,9 +26,10 @@ class addressbook_contactform
|
|||||||
* @param string $email=null comma-separated email addresses
|
* @param string $email=null comma-separated email addresses
|
||||||
* @param string $tpl_name=null custom etemplate to use
|
* @param string $tpl_name=null custom etemplate to use
|
||||||
* @param string $subject=null subject for email
|
* @param string $subject=null subject for email
|
||||||
|
* @param string $copytoresiver=false send a copy of notification to resiver
|
||||||
* @return string html content
|
* @return string html content
|
||||||
*/
|
*/
|
||||||
function display($content=null,$addressbook=null,$fields=null,$msg=null,$email=null,$tpl_name=null,$subject=null)
|
function display($content=null,$addressbook=null,$fields=null,$msg=null,$email=null,$tpl_name=null,$subject=null,$copytoresiver=false)
|
||||||
{
|
{
|
||||||
#error_log( "<p>addressbook_contactform::display(".print_r($content,true).",$addressbook,".print_r($fields,true).",$msg,$tpl_name)</p>\n");
|
#error_log( "<p>addressbook_contactform::display(".print_r($content,true).",$addressbook,".print_r($fields,true).",$msg,$tpl_name)</p>\n");
|
||||||
if (empty($tpl_name) && !empty($content['tpl_form_name'])) $tpl_name =$content['tpl_form_name'];
|
if (empty($tpl_name) && !empty($content['tpl_form_name'])) $tpl_name =$content['tpl_form_name'];
|
||||||
@ -105,6 +106,7 @@ class addressbook_contactform
|
|||||||
$preserv['is_contactform'] = true;
|
$preserv['is_contactform'] = true;
|
||||||
$preserv['email_contactform'] = $email;
|
$preserv['email_contactform'] = $email;
|
||||||
$preserv['subject_contactform'] = $subject;
|
$preserv['subject_contactform'] = $subject;
|
||||||
|
$preserv['email_copytoresiver'] = $copytoresiver;
|
||||||
#if (!$fields) $fields = array('org_name','n_fn','email','tel_work','url','note','captcha');
|
#if (!$fields) $fields = array('org_name','n_fn','email','tel_work','url','note','captcha');
|
||||||
$custom = 1;
|
$custom = 1;
|
||||||
foreach($fields as $name)
|
foreach($fields as $name)
|
||||||
|
@ -92,7 +92,9 @@ class addressbook_tracking extends bo_tracking
|
|||||||
case 'copy':
|
case 'copy':
|
||||||
if ($data['is_contactform'])
|
if ($data['is_contactform'])
|
||||||
{
|
{
|
||||||
return preg_split('/, ?/',$data['email_contactform']);
|
$copy = preg_split('/, ?/',$data['email_contactform']);
|
||||||
|
if ($data['email_copytoresiver']) $copy[] = $data['email'];
|
||||||
|
return $copy;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -107,6 +107,11 @@ class module_addressbook_contactform extends sitemgr_module
|
|||||||
'params' => array('size' => 40),
|
'params' => array('size' => 40),
|
||||||
'default' => 'addressbook.contactform',
|
'default' => 'addressbook.contactform',
|
||||||
),
|
),
|
||||||
|
'arg7' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => lang('Send emailcopy to receiver'),
|
||||||
|
'params' => array('size' => 1),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
return parent::get_user_interface();
|
return parent::get_user_interface();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user