Merge pull request #8794 from ATM-Nicolas/fix_select_user

FIX : Select user on add time spent form
This commit is contained in:
Laurent Destailleur 2018-05-18 11:27:05 +02:00 committed by GitHub
commit 71f8971a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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