Merge pull request #1507 from GPCsolutions/3.5-taskswithtime
Project: make tasks accept a time
This commit is contained in:
commit
c2b7e40aa1
@ -342,12 +342,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
|
||||
// Date start
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_start,'day');
|
||||
print dol_print_date($lines[$i]->date_start,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Date end
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_end,'day');
|
||||
print dol_print_date($lines[$i]->date_end,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Planned Workload (in working hours)
|
||||
@ -500,12 +500,12 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
|
||||
|
||||
// Date start
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_start,'day');
|
||||
print dol_print_date($lines[$i]->date_start,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Date end
|
||||
print '<td align="center">';
|
||||
print dol_print_date($lines[$i]->date_end,'day');
|
||||
print dol_print_date($lines[$i]->date_end,'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Planned Workload
|
||||
|
||||
@ -83,8 +83,8 @@ if ($action == 'createtask' && $user->rights->projet->creer)
|
||||
{
|
||||
$error=0;
|
||||
|
||||
$date_start = dol_mktime(0,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
|
||||
$date_end = dol_mktime(0,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
|
||||
$date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyeassskr'],'user');
|
||||
$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
|
||||
|
||||
if (empty($_POST["cancel"]))
|
||||
{
|
||||
@ -232,12 +232,12 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print dol_print_date($object->date_start,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print dol_print_date($object->date_end,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Other options
|
||||
@ -302,12 +302,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->socie
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print $form->select_date(($date_start?$date_start:''),'dateo',0,0,0,'',1,1);
|
||||
print $form->select_date(($date_start?$date_start:''),'dateo',1,1,0,'',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print $form->select_date(($date_end?$date_end:-1),'datee',0,0,0,'',1,1);
|
||||
print $form->select_date(($date_end?$date_end:-1),'datee',1,1,0,'',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// planned workload
|
||||
|
||||
@ -83,8 +83,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
||||
$object->description = $_POST['description'];
|
||||
$object->fk_task_parent = $task_parent;
|
||||
$object->planned_workload = $planned_workload;
|
||||
$object->date_start = dol_mktime(0,0,0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
|
||||
$object->date_end = dol_mktime(0,0,0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
|
||||
$object->date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user');
|
||||
$object->date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
|
||||
$object->progress = $_POST['progress'];
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
@ -322,12 +322,12 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print $form->select_date($object->date_start,'dateo');
|
||||
print $form->select_date($object->date_start,'dateo',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print $form->select_date($object->date_end?$object->date_end:-1,'datee');
|
||||
print $form->select_date($object->date_end?$object->date_end:-1,'datee',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Planned workload
|
||||
@ -411,12 +411,12 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="3">';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
print dol_print_date($object->date_start,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td colspan="3">';
|
||||
print dol_print_date($object->date_end,'day');
|
||||
print dol_print_date($object->date_end,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Planned workload
|
||||
|
||||
Loading…
Reference in New Issue
Block a user