Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/class/html.formmail.class.php htdocs/core/js/timesheet.js
This commit is contained in:
commit
b4600fdc06
@ -93,7 +93,7 @@ if (! $error && $massaction == 'confirm_presend')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check mandatory parameters
|
// Check mandatory parameters
|
||||||
if (empty($user->email))
|
if (GETPOST('fromtype','alpha') === 'user' && empty($user->email))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings');
|
setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings');
|
||||||
|
|||||||
@ -881,14 +881,17 @@ class FormMail extends Form
|
|||||||
|
|
||||||
$out.= '<td>';
|
$out.= '<td>';
|
||||||
|
|
||||||
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 (GETPOSTISSET('sendmail'))
|
||||||
}
|
{
|
||||||
// If a template was selected, we use setup of template to define if join file checkbox is selected or not.
|
$this->withmaindocfile = (GETPOST('addmaindocfile', 'alpha') ? -1 : 1);
|
||||||
elseif (is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0)
|
}
|
||||||
{
|
// If a template was selected, we use setup of template to define if join file checkbox is selected or not.
|
||||||
$this->withmaindocfile = ($arraydefaultmessage->joinfiles ? -1 : 1);
|
elseif (is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0)
|
||||||
|
{
|
||||||
|
$this->withmaindocfile = ($arraydefaultmessage->joinfiles ? -1 : 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($this->withmaindocfile))
|
if (! empty($this->withmaindocfile))
|
||||||
|
|||||||
@ -68,7 +68,7 @@ $(document).ready(function(){
|
|||||||
modal: true,
|
modal: true,
|
||||||
height: windowHeight,
|
height: windowHeight,
|
||||||
width: windowWidth,
|
width: windowWidth,
|
||||||
title: "<?php echo $langs->trans('LinesToImport'); ?>",
|
title: "<?php echo $langs->transnoentities('LinesToImport'); ?>",
|
||||||
buttons: {
|
buttons: {
|
||||||
"<?php echo $langs->trans('Import'); ?>": function() {
|
"<?php echo $langs->trans('Import'); ?>": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
|
|||||||
@ -499,7 +499,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
|
|
||||||
// Planned workload
|
// Planned workload
|
||||||
print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
|
print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
|
||||||
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 '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Progress
|
// Progress
|
||||||
@ -515,11 +515,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
|
|
||||||
// Other options
|
// Other options
|
||||||
$parameters=array();
|
$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;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($reshook) && ! empty($extrafields_task->attribute_label))
|
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 '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user