From d3ae285c0c3b2a480893dfe46ed44d7cb44a6844 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 21 Mar 2018 22:58:17 +0100 Subject: [PATCH] finish work --- htdocs/core/actions_sendmails.inc.php | 3 +++ htdocs/core/class/html.formmail.class.php | 2 +- .../triggers/interface_50_modAgenda_ActionsAuto.class.php | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 3498bbc132c..fc21202959c 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -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)) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index b2f64f4298d..2b1c94889e3 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -335,7 +335,7 @@ class FormMail extends Form $out.= "\n".'
'."\n"; if ($this->withform == 1) { - $out.= '
'."\n"; + $out.= ''."\n"; $out.= ''; $out.= ''; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 78053a0631c..6922189abc4 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -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)