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 (!empty($object->usage_task) && !empty($object->lines)) {
|
||||||
|
print ' <span id="divreportdate" class="hidden"> <input type="checkbox" class="valignmiddle" id="reportdate" name="reportdate" value="yes" ';
|
||||||
if ($comefromclone) {
|
if ($comefromclone) {
|
||||||
print ' checked ';
|
print ' checked ';
|
||||||
}
|
}
|
||||||
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label>';
|
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label></span>';
|
||||||
|
}
|
||||||
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>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user