mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
feat: disable choosing token user for admin if creating from his list
This commit is contained in:
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user