Fix: When disabled, all fields must be disabled. Need backport.
This commit is contained in:
parent
2624632fde
commit
96b49cfabe
@ -3899,7 +3899,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');
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -129,8 +127,18 @@ $tasksarray=$taskstatic->getTasksArray(0,0,($project->id?$project->id:$projectsL
|
||||
$projectsrole=$taskstatic->getUserRolesForProjectsOrTasks($user,0,($project->id?$project->id:$projectsListId),0);
|
||||
$tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$project->id:$projectsListId),0);
|
||||
|
||||
|
||||
llxHeader("",$title,"");
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||
|
||||
// Filter on user
|
||||
dol_fiche_head('');
|
||||
print '<table class="border" width="100%"><tr><td width="25%">'.$langs->trans("User").'</td>';
|
||||
print '<td>'.$user->getLoginUrl(1).'</td>';
|
||||
print '</tr></table>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addtime">';
|
||||
@ -148,8 +156,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>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user