diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8b0730bbf8c..e6aa1832ddb 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -133,16 +133,13 @@ class Form
* Show a text and picto with tooltip on text or picto
* @param text Text to show
* @param htmltext Content html of tooltip, coded into HTML/UTF8
- * @param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip sur les 2 et force en Ajax
+ * @param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2
* @param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est apres
* @param img Code img du picto (use img_xxx() function to get it)
- * @param i Numero of tooltip
- * @param width Width of tooltip
- * @param shiftX Shift of tooltip
* @return string Code html du tooltip (texte+picto)
* @see Use function textwithpicto if you can.
*/
- function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$width='200',$shiftX='10')
+ function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='')
{
global $conf;
@@ -159,60 +156,45 @@ class Form
$htmltext=str_replace("
\n","
",$htmltext);
$htmltext=str_replace("\n","",$htmltext);
- if ($conf->use_javascript_ajax && $tooltipon == 4)
+ if ($conf->use_javascript_ajax)
{
- $s = '
'."\n";
- $s.= $text;
- $s.= '
'."\n";
- $s.= ''."\n";
- $s.= $htmltext."\n";
- $s.= '
'."\n";
- $s.= ''."\n";
- }
- else
- {
- if ($conf->use_javascript_ajax)
- {
- $htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon==1 || $tooltipon==3)
- {
- $paramfortooltiptext.=' onmouseover="showtip(\''.$htmltext.'\')"';
- $paramfortooltiptext.=' onMouseout="hidetip()"';
- }
- if ($tooltipon==2 || $tooltipon==3)
- {
- $paramfortooltippicto.=' onmouseover="showtip(\''.$htmltext.'\')"';
- $paramfortooltippicto.=' onMouseout="hidetip()"';
- }
+ $htmltext=str_replace('"',""",$htmltext);
+ if ($tooltipon==1 || $tooltipon==3)
+ {
+ $paramfortooltiptext.=' onmouseover="showtip(\''.$htmltext.'\')"';
+ $paramfortooltiptext.=' onMouseout="hidetip()"';
}
+ if ($tooltipon==2 || $tooltipon==3)
+ {
+ $paramfortooltippicto.=' onmouseover="showtip(\''.$htmltext.'\')"';
+ $paramfortooltippicto.=' onMouseout="hidetip()"';
+ }
+ }
+
+ $s="";
+ $s.='';
+ if ($direction > 0)
+ {
+ if ($text != '')
+ {
+ $s.='| '.$text;
+ if ($direction) $s.=' ';
+ $s.=' | ';
+ }
+ if ($direction) $s.=''.$img.' | ';
+ }
+ else
+ {
+ if ($direction) $s.=''.$img.' | ';
+ if ($text != '')
+ {
+ $s.='';
+ if ($direction) $s.=' ';
+ $s.=$text.' | ';
+ }
+ }
+ $s.='
';
- $s="";
- $s.='';
- if ($direction > 0)
- {
- if ($text != '')
- {
- $s.='| '.$text;
- if ($direction) $s.=' ';
- $s.=' | ';
- }
- if ($direction) $s.=''.$img.' | ';
- }
- else
- {
- if ($direction) $s.=''.$img.' | ';
- if ($text != '')
- {
- $s.='';
- if ($direction) $s.=' ';
- $s.=$text.' | ';
- }
- }
- $s.='
';
- }
return $s;
}