diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index d3cdc0093b1..adf7b9b7c89 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -93,7 +93,7 @@ if (! $error && $massaction == 'confirm_presend') } // Check mandatory parameters - if (empty($user->email)) + if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) { $error++; setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index de93ee8f66d..a71a0a15da0 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -881,14 +881,17 @@ class FormMail extends Form $out.= ''; - if (GETPOSTISSET('sendmail')) + if ($this->withmaindocfile) // withmaindocfile is set to 1 or -1 to show the checkbox (-1 = checked or 1 = not checked) { - $this->withmaindocfile = (GETPOST('addmaindocfile', 'alpha') ? -1 : 1); - } - // If a template was selected, we use setup of template to define if join file checkbox is selected or not. - elseif (is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) - { - $this->withmaindocfile = ($arraydefaultmessage->joinfiles ? -1 : 1); + if (GETPOSTISSET('sendmail')) + { + $this->withmaindocfile = (GETPOST('addmaindocfile', 'alpha') ? -1 : 1); + } + // If a template was selected, we use setup of template to define if join file checkbox is selected or not. + elseif (is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) + { + $this->withmaindocfile = ($arraydefaultmessage->joinfiles ? -1 : 1); + } } if (! empty($this->withmaindocfile)) diff --git a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php index ad32f1b9aa8..ae80389bd3a 100644 --- a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php +++ b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php @@ -68,7 +68,7 @@ $(document).ready(function(){ modal: true, height: windowHeight, width: windowWidth, - title: "trans('LinesToImport'); ?>", + title: "transnoentities('LinesToImport'); ?>", buttons: { "trans('Import'); ?>": function() { $( this ).dialog( "close" ); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 47c88885bc4..31f860dbf9b 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -499,7 +499,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Planned workload print ''.$langs->trans("PlannedWorkload").''; - print $form->select_duration('planned_workload', $planned_workload?$planned_workload : $object->planned_workload,0,'text'); + print $form->select_duration('planned_workload', $planned_workload?$planned_workload : 0, 0, 'text'); print ''; // Progress @@ -515,11 +515,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Other options $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$taskstatic,$action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; + if (empty($reshook) && ! empty($extrafields_task->attribute_label)) { - print $object->showOptionals($extrafields_task,'edit'); + print $taskstatic->showOptionals($extrafields_task,'edit'); // Do not use $object here that is object of project } print '';