From c97c5e0cfd4e635bbaeea0db0fae006731486fc3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 23 Apr 2015 13:54:49 +0200 Subject: [PATCH] Fix selection of user was lost --- htdocs/projet/tasks/time.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 9951902ec5b..43f7f9f19ab 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -375,10 +375,13 @@ if ($id > 0 || ! empty($ref)) print '<td class="nowrap">'; print img_object('','user','class="hideonsmartphone"'); $contactsoftask=$object->getListContactId('internal'); - if (count($contactsoftask)>0) { + if (count($contactsoftask)>0) + { $userid=$contactsoftask[0]; - print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask); - }else { + print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask); + } + else + { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } print '</td>'; -- GitLab