From ebc11a7a9c953364e4130e44ee8adc535d4dd70b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Aug 2014 11:08:36 +0200 Subject: [PATCH] Fix: When disabled, all fields must be disabled. Need backport. --- htdocs/core/class/html.form.class.php | 2 +- htdocs/projet/activity/list.php | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 716f4933176..8eb7eee4220 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3769,7 +3769,7 @@ class Form } elseif ($typehour=='text') { - print ''; + print ''; } print $langs->trans('Hours'); diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php index 93e8bf95647..9ebd2cad9fe 100644 --- a/htdocs/projet/activity/list.php +++ b/htdocs/projet/activity/list.php @@ -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,8 +131,18 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr //var_dump($taskrole); + +llxHeader("",$title,""); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); +// Filter on user +dol_fiche_head(''); +print ''; +print ''; +print '
'.$langs->trans("User").''.$user->getLoginUrl(1).'
'; +dol_fiche_end(); + dol_htmloutput_mesg($mesg); @@ -156,8 +164,15 @@ print ''.$langs->trans("Progress").''; print ''.$langs->trans("TimeSpent").''; print ''.$langs->trans("AddDuration").''; print "\n"; -projectLinesb($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine); +if (count($tasksarray) > 0) +{ + projectLinesb($j, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine); +} +else +{ + print ''.$langs->trans("NoTasks").''; +} print ""; print '';