Debug v17

This commit is contained in:
Laurent Destailleur
2023-02-19 01:34:45 +01:00
parent 833505b5e2
commit e2c558f9cc
2 changed files with 31 additions and 36 deletions

View File

@@ -724,7 +724,7 @@ class Form
* @param string $extracss Add a CSS style to td, div or span tag
* @param int $noencodehtmltext Do not encode into html entity the htmltext
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
* @param string $tooltiptrigger ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable')
* @param string $tooltiptrigger ''=Tooltip on hover and hidden on smartphone, 'abconsmartphone'=Tooltip on hover and on click on smartphone, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable')
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
* @return string HTML code of text, picto, tooltip
*/
@@ -732,11 +732,6 @@ class Form
{
global $conf, $langs;
$alt = '';
if ($tooltiptrigger) {
$alt = $langs->transnoentitiesnoconv("ClickToShowHelp");
}
//For backwards compatibility
if ($type == '0') {
$type = 'info';
@@ -744,6 +739,15 @@ class Form
$type = 'help';
}
if (preg_match('/onsmartphone$/', $tooltiptrigger) && empty($conf->dol_no_mouse_hover)) {
$tooltiptrigger = preg_replace('/^.*onsmartphone$/', '', $tooltiptrigger);
}
$alt = '';
if ($tooltiptrigger) {
$alt = $langs->transnoentitiesnoconv("ClickToShowHelp");
}
// If info or help with no javascript, show only text
if (empty($conf->use_javascript_ajax)) {
if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') {