From dc18759c6c022b7049c352ae9c587b932cf90b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 27 Dec 2014 11:15:26 +0100 Subject: [PATCH] Attribut width not allowed with div or span --- htdocs/core/class/html.form.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 09e3404837d..491e590403c 100755 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -399,28 +399,28 @@ class Form if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag $s=""; - if (empty($notabs)) $s.=''; - if ($direction < 0) { + if (empty($notabs)) $s.='
'; + if ($direction < 0) { $s.='<'.$tag.$paramfortooltipimg; if ($tag == 'td') { - $s .= 'valign="top" '; + $s .= ' valign="top" width="14"'; } - $s.= 'width="14">'.$img.''; + $s.= '>'.$img.''; } // Use another method to help avoid having a space in value in order to use this value with jquery // TODO add this in css - //if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''; + //if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''; $paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':''); $paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':''); - if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''; - if ($direction > 0) { + if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''; + if ($direction > 0) { $s.='<'.$tag.$paramfortooltipimg; if ($tag == 'td') { - $s .= 'valign="top" '; + $s .= ' valign="top" width="14"'; } - $s.= 'width="14">'.$img.''; + $s.= '>'.$img.''; } - if (empty($notabs)) $s.='
'; + if (empty($notabs)) $s.=''; return $s; }