diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index f65e363cef9..a073f70e610 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -388,23 +388,24 @@ class AdherentType extends CommonObject * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen length max label + * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto=0, $maxlen=0) { global $langs; $result=''; $label=$langs->trans("ShowTypeCard",$this->label); - $link = ''; + $linkstart = ''; $linkend=''; - $picto='group'; + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= ($maxlen?dol_trunc($this->label,$maxlen):$this->label); + $result .= $linkend; - if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) $result.=' '; - $result.=$link.($maxlen?dol_trunc($this->label,$maxlen):$this->label).$linkend; return $result; } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 7eaefa6fc33..eb44809178f 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -204,10 +204,10 @@ if ($action == 'confirm_delete' && $user->rights->adherent->configurer) * View */ -llxHeader('',$langs->trans("MembersTypeSetup"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); - $form=new Form($db); +llxHeader('',$langs->trans("MembersTypeSetup"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); + // List of members type if (! $rowid && $action != 'create' && $action != 'edit') @@ -252,11 +252,21 @@ if (! $rowid && $action != 'create' && $action != 'edit') print '