';
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
@@ -424,12 +422,12 @@ else
if (count($tasksarray) > 0)
{
// Show all lines in taskarray (recursive function to go down on tree)
- $j=0;
+ $j=0; $level=0;
$nboftaskshown=projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $id, 1);
}
else
{
- print '
| '.$langs->trans("NoTasks").' |
';
+ print '
| '.$langs->trans("NoTasks").' |
';
}
print "";
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index f6532e09d31..304781e8309 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -60,12 +60,12 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
$timespent_durationmin = GETPOST('timespent_durationmin','int');
if (empty($timespent_durationhour) && empty($timespent_durationmin))
{
- $mesg='
'.$langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Duration")).'
';
+ setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Duration")),'errors');
$error++;
}
if (empty($_POST["userid"]))
{
- $mesg='
'.$langs->trans('ErrorUserNotAffectedToTask').'
';
+ setEventMessage($langs->trans('ErrorUserNotAffectedToTask'),'errors');
$error++;
}
@@ -82,11 +82,12 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
$result=$object->addTimeSpent($user);
if ($result >= 0)
{
-
+ setEventMessage($langs->trans("RecordSaved"));
}
else
{
- $mesg='
'.$langs->trans($object->error).'
';
+ setEventMessage($langs->trans($object->error),'errors');
+ $error++;
}
}
else
@@ -101,7 +102,7 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
if (empty($_POST["new_durationhour"]) && empty($_POST["new_durationmin"]))
{
- $mesg='
'.$langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Duration")).'
';
+ setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Duration")),'errors');
$error++;
}
@@ -120,11 +121,12 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
$result=$object->updateTimeSpent($user);
if ($result >= 0)
{
-
+ setEventMessage($langs->trans("RecordSaved"));
}
else
{
- $mesg='
'.$langs->trans($object->error).'
';
+ setEventMessage($langs->trans($object->error),'errors');
+ $error++;
}
}
else
@@ -141,7 +143,8 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->c
if (!$result)
{
$langs->load("errors");
- $mesg='
'.$langs->trans($object->error).'
';
+ setEventMessage($langs->trans($object->error),'errors');
+ $error++;
$action='';
}
}