FIX : Select user on add time spent form

This commit is contained in:
ATM-Nicolas 2018-05-14 15:16:07 +02:00
parent e1585a4d68
commit ca09fddfb3

View File

@ -568,7 +568,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
$contactsoftask=$object->getListContactId('internal');
if (count($contactsoftask)>0)
{
$userid=$contactsoftask[0];
if(in_array($user->id, $contactsoftask)) $userid = $user->id;
else $userid=$contactsoftask[0];
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200');
}
else