finish work

This commit is contained in:
florian HENRY 2018-03-21 22:58:17 +01:00
parent dc6f4c1f4d
commit d3ae285c0c
3 changed files with 8 additions and 1 deletions

View File

@ -457,6 +457,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if (is_array($attachedfiles) && count($attachedfiles)>0) {
$object->attachedfiles = $attachedfiles;
}
if (is_array($sendtouserid) && count($sendtouserid)>0 && !empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) {
$object->sendtouserid = $sendtouserid;
}
// Call of triggers
if (! empty($trigger_name))

View File

@ -335,7 +335,7 @@ class FormMail extends Form
$out.= "\n".'<!-- Begin form mail type='.$this->param["models"].' --><div id="mailformdiv"></div>'."\n";
if ($this->withform == 1)
{
$out.= '<form method="POST" name="mailform" id="mailform" action="'.$this->param["returnurl"].'#formmail">'."\n";
$out.= '<form method="POST" name="mailform" id="mailform" enctype="multipart/form-data" action="'.$this->param["returnurl"].'#formmail">'."\n";
$out.= '<a id="formmail" name="formmail"></a>';
$out.= '<input style="display:none" type="submit" id="sendmail" name="sendmail">';

View File

@ -889,6 +889,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
$actioncomm->fk_element = $elementid;
$actioncomm->elementtype = $elementtype;
if (property_exists($object,'sendtouserid') && is_array($object->sendtouserid) && count($object->sendtouserid)>0) {
$actioncomm->userassigned=$object->sendtouserid;
}
$ret=$actioncomm->create($user); // User creating action
if ($ret > 0 && $conf->global->MAIN_COPY_FILE_IN_EVENT_AUTO)