Fix: When disabled, all fields must be disabled. Need backport.

Conflicts:
	htdocs/projet/activity/list.php
This commit is contained in:
Laurent Destailleur 2014-08-07 11:08:36 +02:00
parent d694b10274
commit a49bce10de
2 changed files with 12 additions and 4 deletions

View File

@ -3713,7 +3713,7 @@ class Form
}
elseif ($typehour=='text')
{
print '<input type="text" size="3" name="'.$prefix.'hour" class="flat" value="'.((int) $hourSelected).'">';
print '<input type="text" size="3" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').' class="flat" value="'.((int) $hourSelected).'">';
}
print $langs->trans('Hours'). "&nbsp;";
print '<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled="disabled"':'').'>';

View File

@ -114,8 +114,6 @@ $title=$langs->trans("TimeSpent");
if ($mine) $title=$langs->trans("MyTimeSpent");
llxHeader("",$title,"");
//$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // Return all project i have permission on. I want my tasks and some of my task may be on a public projet that is not my project
@ -133,6 +131,9 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
//var_dump($taskrole);
llxHeader("",$title,"");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
@ -156,8 +157,15 @@ print '<td align="right">'.$langs->trans("Progress").'</td>';
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
print "</tr>\n";
projectLinesb($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine);
if (count($tasksarray) > 0)
{
projectLinesb($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine);
}
else
{
print '<tr><td colspan="10">'.$langs->trans("NoTasks").'</td></tr>';
}
print "</table>";
print '</form>';