diff --git a/htdocs/user/card.php b/htdocs/user/card.php index a55b04bf0d0..dcaceaff43c 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1900,9 +1900,15 @@ if ($action == 'create' || $action == 'adduserldap') { if ($user->id <> $id && $candisableuser && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { if ($user->admin || !$object->admin) { // If user edited is admin, delete is possible on for an admin - print '
'; + print dolGetButtonAction($langs->trans('DeleteUser'), '', 'default', $_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$object->id, ''); } else { - print ''; + $params = array( + 'attr' => array( + 'title' => $langs->trans('MustBeAdminToDeleteOtherAdmin'), + 'class' => 'classfortooltip' + ) + ); + print dolGetButtonAction($langs->trans('DeleteUser'), '', 'default', $_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$object->id, '', false); } } }