feat: disable choosing token user for admin if creating from his list
This commit is contained in:
parent
366b0f231e
commit
9af9bbfa3b
1 changed files with 2 additions and 3 deletions
|
|
@ -378,11 +378,10 @@ if ($action == 'create') {
|
|||
|
||||
print '<table class="border centpercent tableforfieldcreate">';
|
||||
|
||||
if ($user->admin) {
|
||||
if ($user->admin && empty($id)) {
|
||||
print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">'.$langs->trans('User').'</td>';
|
||||
print '<td class="valuefieldcreate">';
|
||||
$selecteduser = !empty($id) ? $id : '';
|
||||
print $form->select_dolusers($selecteduser, 'user', 1, null, 0, '', '', (string) $object->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500');
|
||||
print $form->select_dolusers('', 'user', 1, null, 0, '', '', (string) $object->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500');
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">'.$langs->trans('User').'</td><td class="valuefieldcreate">'.($person_name ?? '').'</td></tr>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue