Skip to content
Snippets Groups Projects
Commit a780f79e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: W3C

parent f680dc7d
No related branches found
No related tags found
No related merge requests found
...@@ -252,6 +252,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid') ...@@ -252,6 +252,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
/** /**
* Output a task line * Output a task line
*
* @param $inc * @param $inc
* @param $parent * @param $parent
* @param $lines * @param $lines
...@@ -287,7 +288,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $ ...@@ -287,7 +288,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
$lastprojectid=$lines[$i]->fk_project; $lastprojectid=$lines[$i]->fk_project;
} }
print "<tr $bc[$var]>\n"; print "<tr ".$bc[$var].">\n";
// Project // Project
print "<td>"; print "<td>";
...@@ -366,6 +367,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $ ...@@ -366,6 +367,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
/** /**
* Show task lines with a particular parent * Show task lines with a particular parent
*
* @param $inc Counter that count number of lines legitimate to show (for return) * @param $inc Counter that count number of lines legitimate to show (for return)
* @param $parent Id of parent task to start * @param $parent Id of parent task to start
* @param $lines Array of all tasks * @param $lines Array of all tasks
...@@ -512,6 +514,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole ...@@ -512,6 +514,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole
if ($total>0) if ($total>0)
{ {
print '<tr class="liste_total"><td class="liste_total">'.$langs->trans("Total").'</td>'; print '<tr class="liste_total"><td class="liste_total">'.$langs->trans("Total").'</td>';
if ($showproject) print '<td></td>';
print '<td></td>'; print '<td></td>';
print '<td></td>'; print '<td></td>';
print '<td align="right" nowrap="nowrap" class="liste_total">'.ConvertSecondToTime($total).'</td></tr>'; print '<td align="right" nowrap="nowrap" class="liste_total">'.ConvertSecondToTime($total).'</td></tr>';
......
...@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); ...@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
$langs->load('projects'); $langs->load('projects');
$mode=$_REQUEST["mode"]; $mode=GETPOST("mode");
$mine=0; $mine=0;
if ($mode == 'mine') $mine=1; if ($mode == 'mine') $mine=1;
...@@ -45,6 +45,7 @@ $socid=0; ...@@ -45,6 +45,7 @@ $socid=0;
if ($user->societe_id > 0) $socid=$user->societe_id; if ($user->societe_id > 0) $socid=$user->societe_id;
$result = restrictedArea($user, 'projet', $projectid); $result = restrictedArea($user, 'projet', $projectid);
/* /*
* Actions * Actions
*/ */
...@@ -80,6 +81,10 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer) ...@@ -80,6 +81,10 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer)
$task->timespent_fk_user = $user->id; $task->timespent_fk_user = $user->id;
$task->timespent_date = dol_mktime(12,0,0,$_POST["{$id}month"],$_POST["{$id}day"],$_POST["{$id}year"]); $task->timespent_date = dol_mktime(12,0,0,$_POST["{$id}month"],$_POST["{$id}day"],$_POST["{$id}year"]);
$task->addTimeSpent($user); $task->addTimeSpent($user);
// header to avoid submit twice on back
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid);
exit;
} }
else else
{ {
...@@ -121,7 +126,8 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr ...@@ -121,7 +126,8 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
if ($mesg) print $mesg;
dol_htmloutput_mesg($mesg);
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">'; print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
...@@ -143,7 +149,7 @@ print '</form>'; ...@@ -143,7 +149,7 @@ print '</form>';
print "</table>"; print "</table>";
print '</div>'; print '</div>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment