Fix regression in button
This commit is contained in:
parent
b1e826da15
commit
1a8af3509e
@ -1911,12 +1911,12 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||||||
);
|
);
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) {
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) {
|
||||||
print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken().$langs->trans("Reactivate"), '', true, $params);
|
print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken(), '', true, $params);
|
||||||
}
|
}
|
||||||
// Disable user
|
// Disable user
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) {
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) {
|
||||||
print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken().$langs->trans("DisableUser"), '', true, $params);
|
print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken(), '', true, $params);
|
||||||
} else {
|
} else {
|
||||||
if ($user->id == $id) {
|
if ($user->id == $id) {
|
||||||
$params['attr']['title'] = $langs->trans('CantDisableYourself');
|
$params['attr']['title'] = $langs->trans('CantDisableYourself');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user