diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 5dda67de5a3..9abba40be0c 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -731,7 +731,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.$langs->trans("Validate").''."\n"; } else { $langs->load("errors"); - print ''.$langs->trans("Validate").''."\n"; + print ''.$langs->trans("Validate").''."\n"; } } } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8eca3b5adab..9a77e780c06 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1698,15 +1698,22 @@ class Categorie extends CommonObject * Return name and link of category (with picto) * Use ->id, ->ref, ->label, ->color * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Sur quoi pointe le lien ('', 'xyz') - * @param int $maxlength Max length of text - * @param string $moreparam More param on URL link + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param string $option On what the link point to ('nolink', ...) + * @param int $maxlength Max length of text + * @param string $moreparam More param on URL link + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '') + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = '') { - global $hookmanager; + global $conf, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $params = [ @@ -1724,6 +1731,19 @@ class Categorie extends CommonObject $label = implode($this->getTooltipContentArray($params)); } + $url = DOL_URL_ROOT.'/categories/viewcat.php?id='.$this->id.'&type='.$this->type.$moreparam.'&backtopage='.urlencode($_SERVER['PHP_SELF'].($moreparam ? '?'.$moreparam : '')); + + if ($option !== 'nolink') { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && isset($_SERVER["PHP_SELF"]) && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) { + $add_save_lastsearch_values = 1; + } + if ($url && $add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; + } + } + // Check contrast with background and correct text color $forced_color = 'categtextwhite'; if ($this->color) { @@ -1731,24 +1751,43 @@ class Categorie extends CommonObject $forced_color = 'categtextblack'; } } - $link = ''; - $linkend = ''; - $picto = 'category'; + $linkclose = ''; + if (empty($notooltip)) { + if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { + $label = $langs->trans("ShowMyObject"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); + $linkclose .= $dataparams.' class="'.$classfortooltip.' '.$forced_color.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$forced_color.($morecss ? ' '.$morecss : '').'"' : ''); + } + if ($option == 'nolink' || empty($url)) { + $linkstart = ''; + if ($option == 'nolink' || empty($url)) { + $linkend = ''; + } else { + $linkend = ''; + } + + $result .= $linkstart; if ($withpicto) { - $result .= ($link.img_object($label, $picto, $dataparams.' class="'.$classfortooltip.'"').$linkend); - } - if ($withpicto && $withpicto != 2) { - $result .= ' '; + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"'), 0, 0, $notooltip ? 0 : 1); } + if ($withpicto != 2) { - $result .= $link.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend; + $result .= dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength); } + + $result .= $linkend; + global $action; $hookmanager->initHooks(array($this->element . 'dao')); $parameters = array('id'=>$this->id, 'getnomurl' => &$result); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 6e99bea3958..eb322bbeb3f 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -204,6 +204,7 @@ foreach ($fulltree as $key => $val) { $entry .= ''.$li.''; $entry .= ''; + // Add column counter $entry .= $counter; $entry .= ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 95fc55c5908..93c7608e54d 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -46,14 +46,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - if (isModEnabled('commande')) { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; } @@ -5656,7 +5655,7 @@ if ($action == 'create') { if (getDolGlobalString('INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE') || ($resteapayer == price2num($object->total_ttc, 'MT', 1) && empty($object->paye))) { if (!$objectidnext && $object->is_last_in_cycle()) { if ($usercanunvalidate) { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params); } else { $params['attr']['title'] = $langs->trans('NotEnoughPermissions'); @@ -5687,7 +5686,7 @@ if ($action == 'create') { && ($object->statut == Facture::STATUS_CLOSED || $object->status == Facture::STATUS_ABANDONED || ($object->status == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data && ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || $usercanreopen)) { // A paid invoice (partially or completely) if ($object->close_code != 'replaced' || (!$objectidnext)) { // Not replaced by another invoice or replaced but the replacement invoice has been deleted - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=reopen&token='.newToken(), '', true, $params); } else { $params['attr']['title'] = $langs->trans("DisabledBecauseReplacedInvoice"); @@ -5709,7 +5708,7 @@ if ($action == 'create') { // Validate if ($object->status == Facture::STATUS_DRAFT && count($object->lines) > 0 && ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION) && (getDolGlobalString('FACTURE_ENABLE_NEGATIVE') || $object->total_ttc >= 0)) || ($object->type == Facture::TYPE_CREDIT_NOTE && $object->total_ttc <= 0))) { if ($usercanvalidate) { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=valid&token='.newToken(), '', true, $params); } } @@ -5721,10 +5720,10 @@ if ($action == 'create') { print ''.$langs->trans('SendMail').''; } else { if ($usercansend) { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=presend&mode=init#formmailbeforetitle', '', true, $params); } else { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction('', $langs->trans('SendMail'), 'default', '#', '', false, $params); } } @@ -5767,7 +5766,7 @@ if ($action == 'create') { } else { // Sometimes we can receive more, so we accept to enter more and will offer a button to convert into discount (but it is not a credit note, just a prepayment done) //print ''.$langs->trans('DoPayment').''; - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('DoPayment'), '', 'default', DOL_URL_ROOT.'/compta/paiement.php?facid='.$object->id.'&action=create'.($object->fk_account > 0 ? '&accountid='.$object->fk_account : ''), '', true, $params); } } @@ -5795,7 +5794,7 @@ if ($action == 'create') { if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->status == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercancreate && (getDolGlobalString('INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED') || $sumofpayment == 0) && $object->total_ht < 0 ) { - print ''.$langs->trans('ConvertToReduc').''; + print ''.$langs->trans('ConvertToReduc').''; } // For down payment invoice (deposit) @@ -5804,7 +5803,7 @@ if ($action == 'create') { if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT') || getDolGlobalInt('DEPOSIT_AS_CREDIT_AVAILABLE_EVEN_UNPAID') || ($object->type == Facture::STATUS_ABANDONED && in_array($object->close_code, array('bankcharge', 'discount_vat', 'other')))) { print ''.$langs->trans('ConvertToReduc').''; } else { - print ''.$langs->trans('ConvertToReduc').''; + print ''.$langs->trans('ConvertToReduc').''; } } } @@ -5821,7 +5820,7 @@ if ($action == 'create') { $params['attr']['title'] = $langs->trans('AmountPaidMustMatchAmountOfDownPayment'); print dolGetButtonAction($langs->trans('ClassifyPaid'), '', 'default', '#', '', false, $params); } else { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ClassifyPaid'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=paid', '', true, $params); } } @@ -5867,14 +5866,14 @@ if ($action == 'create') { // Clone if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate) { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=clone&object=invoice', '', true, $params); } // Clone as predefined / Create template if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->status == 0 && $usercancreate) { if (!$objectidnext && count($object->lines) > 0) { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ChangeIntoRepeatableInvoice'), '', 'default', DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$object->id.'&action=create', '', true, $params); } } @@ -5928,10 +5927,10 @@ if ($action == 'create') { $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); $enableDelete = true; } - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($htmltooltip, $langs->trans('Delete'), 'delete', $deleteHref, '', $enableDelete, $params); } else { - $params['attr']['title'] = ''; + unset($params['attr']['title']); print dolGetButtonAction($htmltooltip, $langs->trans('Delete'), 'delete', '#', '', false); } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index b5440c221b5..beeb962fcd7 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2157,6 +2157,7 @@ if ($action == 'create') { if ($object->status == $object::STATUS_DRAFT && $nbofservices) { if ($user->hasRight('contrat', 'creer')) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken(), '', true, $params); } else { $params['attr']['title'] = $langs->trans("NotEnoughPermissions"); @@ -2165,6 +2166,7 @@ if ($action == 'create') { } if ($object->status == $object::STATUS_VALIDATED) { if ($user->hasRight('contrat', 'creer')) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), '', true, $params); } else { $params['attr']['title'] = $langs->trans("NotEnoughPermissions"); @@ -2199,20 +2201,25 @@ if ($action == 'create') { ); } if (count($arrayofcreatebutton)) { + unset($params['attr']['title']); print dolGetButtonAction('', $langs->trans("Create"), 'default', $arrayofcreatebutton, '', true, $params); } if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) { if ($user->hasRight('contrat', 'activer')) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate&token='.newToken(), '', true, $params); } else { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', '#', '', false, $params); } } if ($object->nbofservicesclosed < $nbofservices) { if ($user->hasRight('contrat', 'desactiver')) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', true, $params); } else { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', '#', '', false, $params); } @@ -2235,10 +2242,12 @@ if ($action == 'create') { // Clone if ($user->hasRight('contrat', 'creer')) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken(), '', true, $params); } // Delete + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete, $params); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 69f2def0906..d39c907fb73 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6046,9 +6046,9 @@ class Form print ''; } else { if (!empty($rate)) { - print price($rate, 1, $langs, 1, 0); + print price($rate, 1, $langs, 0, 0); if ($currency && $rate != 1) { - print '   (' . price($rate, 1, $langs, 1, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')'; + print '   (' . price($rate, 1, $langs, 0, 0) . ' ' . $currency . ' = 1 ' . $conf->currency . ')'; } } else { print 1; diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index b12b8e28d3c..2378b919007 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -170,6 +170,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset print $tab[$x]['buttons']; print ''; } else { + // Show the badge with color for the category print $tab[$x]['entry']; } //print ' -> A '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'
'."\n"; @@ -193,9 +194,11 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset if ($showfk) { print ''; print ''; print '
'; - print ''; + print ''; + print ''; print $tab[$x]['title']; - print ''; + print ''; + print ''; print '(mainmenu='.$tab[$x]['mainmenu'].' - leftmenu='.$tab[$x]['leftmenu'].', fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')'; print ''; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 51b00368708..5ba45ed415a 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1971,17 +1971,19 @@ if ($action == 'create' || $action == 'adduserldap') { $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { + $params = array( + 'attr' => array( + 'title' => '', + 'class' => 'classfortooltip' + ) + ); + if (empty($user->socid)) { $canSendMail = false; - $params = array( - 'attr' => array( - 'title' => '', - 'class' => 'classfortooltip' - ) - ); if (!empty($object->email)) { $langs->load("mails"); $canSendMail = true; + unset($params['attr']['title']); } else { $langs->load("mails"); $params['attr']['title'] = $langs->trans('NoEMail'); @@ -1990,26 +1992,16 @@ if ($action == 'create' || $action == 'adduserldap') { } if ($caneditfield && (!isModEnabled('multicompany') || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { - $params = array( - 'attr' => array( - 'title' => '', - 'class' => 'classfortooltip' - ) - ); if (getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')) { $params['attr']['title'] = $langs->trans('DisabledInMonoUserMode'); print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'#', '', false, $params); } else { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit&token='.newToken(), '', true, $params); } } elseif ($caneditpasswordandsee && !$object->ldap_sid && (!isModEnabled('multicompany') || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { - $params = array( - 'attr' => array( - 'title' => '', - 'class' => 'classfortooltip' - ) - ); + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit', '', true, $params); } @@ -2026,6 +2018,7 @@ if ($action == 'create' || $action == 'adduserldap') { print dolGetButtonAction($langs->trans('ReinitPassword'), '', 'default', $_SERVER['PHP_SELF'].'#', '', false, $params); } elseif (($user->id != $id && $caneditpasswordandsee) && $object->login && !$object->ldap_sid && ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('ReinitPassword'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=password&token='.newToken(), '', true, $params); } @@ -2035,6 +2028,7 @@ if ($action == 'create' || $action == 'adduserldap') { } elseif (($user->id != $id && $caneditpasswordandsend) && $object->login && !$object->ldap_sid && ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { if ($object->email) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('SendNewPassword'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend&token='.newToken(), '', true, $params); } else { $params['attr']['title'] = $langs->trans('NoEMail'); @@ -2043,20 +2037,15 @@ if ($action == 'create' || $action == 'adduserldap') { } } - // Enable user - $params = array( - 'attr' => array( - 'title' => '', - 'class' => 'classfortooltip' - ) - ); if ($user->id != $id && $candisableuser && $object->statut == 0 && ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken(), '', true, $params); } // Disable user if ($user->id != $id && $candisableuser && $object->statut == 1 && ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken(), '', true, $params); } else { if ($user->id == $id) { @@ -2068,6 +2057,7 @@ if ($action == 'create' || $action == 'adduserldap') { if ($user->id != $id && $candisableuser && ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1))) { if ($user->admin || !$object->admin) { // If user edited is admin, delete is possible on for an admin + unset($params['attr']['title']); print dolGetButtonAction($langs->trans('DeleteUser'), '', 'default', $_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$object->id, '', true, $params); } else { $params['attr']['title'] = $langs->trans('MustBeAdminToDeleteOtherAdmin');