diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2b37179dd74..42ffcbb2f6d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -958,7 +958,7 @@ class Form if ($row['code_iso']) { $labeltoshow .= ' ('.$row['code_iso'].')'; if (empty($hideflags)) { - $tmpflag = picto_from_langcode($row['code_iso'], 'class="saturatemedium paddingrightonly"'); + $tmpflag = picto_from_langcode($row['code_iso'], 'class="saturatemedium paddingrightonly"', 1); $labeltoshow = $tmpflag.' '.$labeltoshow; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 899b3b0ffda..a9cb45e06fb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3790,7 +3790,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ return $fullpathpicto; } // tag title is used for tooltip on , tag alt can be used with very simple text on image for blind people - return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup + return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup } /** @@ -3850,10 +3850,11 @@ function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $mo * @param string $picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory. * @param string $moreatt Add more attribute on img tag * @param int $pictoisfullpath If 1, image path is a full path + * @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip. * @return string Return img tag * @see img_object(), img_picto() */ -function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0) +function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $notitle = 0) { global $conf; @@ -3875,7 +3876,7 @@ function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0 } } - return img_picto($titlealt, $path, $moreatt, 1); + return img_picto($titlealt, $path, $moreatt, 1, 0, $notitle); } /** @@ -8126,9 +8127,10 @@ function dol_validElement($element) * * @param string $codelang Language code ('en_IN', 'fr_CA', ...) or ISO Country code on 2 characters in uppercase ('IN', 'FR') * @param string $moreatt Add more attribute on img tag (For example 'style="float: right"' or 'class="saturatemedium"') + * @param int $notitlealt No title alt * @return string HTML img string with flag. */ -function picto_from_langcode($codelang, $moreatt = '') +function picto_from_langcode($codelang, $moreatt = '', $notitlealt = 0) { if (empty($codelang)) { return ''; @@ -8161,7 +8163,7 @@ function picto_from_langcode($codelang, $moreatt = '') $flagImage = empty($tmparray[1]) ? $tmparray[0] : $tmparray[1]; } - return img_picto_common($codelang, 'flags/'.strtolower($flagImage).'.png', $moreatt); + return img_picto_common($codelang, 'flags/'.strtolower($flagImage).'.png', $moreatt, 0, $notitlealt); } /**