FIX Report of date of task suggested only if there is tasks
This commit is contained in:
parent
df27824249
commit
3f3e8a84ff
@ -1153,11 +1153,14 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0);
|
print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0);
|
||||||
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
||||||
print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0);
|
print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0);
|
||||||
print ' <input type="checkbox" class="valignmiddle" id="reportdate" name="reportdate" value="yes" ';
|
$object->getLinesArray(null, 0);
|
||||||
if ($comefromclone) {
|
if (!empty($object->usage_task) && !empty($object->lines)) {
|
||||||
print ' checked ';
|
print ' <span id="divreportdate" class="hidden"> <input type="checkbox" class="valignmiddle" id="reportdate" name="reportdate" value="yes" ';
|
||||||
|
if ($comefromclone) {
|
||||||
|
print ' checked ';
|
||||||
|
}
|
||||||
|
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label></span>';
|
||||||
}
|
}
|
||||||
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label>';
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (isModEnabled('eventorganization')) {
|
if (isModEnabled('eventorganization')) {
|
||||||
@ -1379,6 +1382,11 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
jQuery("#usage_task").prop("checked", true);
|
jQuery("#usage_task").prop("checked", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jQuery("#projectstart").change(function() {
|
||||||
|
console.log("We modify the start date");
|
||||||
|
jQuery("#divreportdate").show();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
|||||||
@ -2305,11 +2305,11 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an array of tasks of current project
|
* Create an array of tasks of current project
|
||||||
*
|
*
|
||||||
* @param User $user Object user we want project allowed to
|
* @param User $user Object user we want project allowed to
|
||||||
* @param int $loadRoleMode 1= will test Roles on task; 0 used in delete project action
|
* @param int $loadRoleMode 1= will test Roles on task; 0 used in delete project action
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
public function getLinesArray($user, $loadRoleMode = 1)
|
public function getLinesArray($user, $loadRoleMode = 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user