From 7b6a4d1bfd923dfca6c8a62ea46a9bbda0196cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 25 Dec 2014 22:50:15 +0100 Subject: [PATCH] Fix: [ bug #1715 ] Valign and width attributes are used in div tags --- htdocs/core/class/html.form.class.php | 16 ++++++++++++++-- htdocs/core/lib/agenda.lib.php | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 61d1c08f2aa..e61f1af9617 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -400,14 +400,26 @@ class Form else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag $s=""; if (empty($notabs)) $s.=''; - if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.''; + if ($direction < 0) { + $s.='<'.$tag.$paramfortooltipimg; + if ($tag == 'td') { + $s .= 'valign="top" '; + } + $s.= 'width="14">'.$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)?' ':'').''; $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) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.''; + if ($direction > 0) { + $s.='<'.$tag.$paramfortooltipimg; + if ($tag == 'td') { + $s .= 'valign="top" '; + } + $s.= 'width="14">'.$img.''; + } if (empty($notabs)) $s.='
'; return $s; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 3d51490f6b2..23a17534ccf 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -149,7 +149,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh if (! empty($conf->browser->phone)) print ''; else print ''; - if (! empty($conf->browser->phone)) print '
'; + if (! empty($conf->browser->phone)) print '
'; else print ''; print '
';