Debug v20 - fix warnings

This commit is contained in:
Laurent Destailleur
2024-07-05 19:53:28 +02:00
parent 7ff3d61321
commit 9cc1edb876
3 changed files with 11 additions and 6 deletions

View File

@@ -5737,9 +5737,10 @@ function img_searchclear($titlealt = 'default', $other = '')
* @param string $admin '1'=Info for admin users. '0'=Info for standard users (change only the look), 'error', 'warning', 'xxx'=Other
* @param string $morecss More CSS ('', 'warning', 'error')
* @param string $textfordropdown Show a text to click to dropdown the info box.
* @param string $picto '' or 'warning'
* @return string String with info text
*/
function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = 'hideonsmartphone', $textfordropdown = '')
function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = 'hideonsmartphone', $textfordropdown = '', $picto = '')
{
global $conf, $langs;
@@ -5751,7 +5752,11 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss
}
$class = (empty($admin) ? 'undefined' : ($admin == '1' ? 'info' : $admin));
$result = ($nodiv ? '' : '<div class="wordbreak '.$class.($morecss ? ' '.$morecss : '').($textfordropdown ? ' hidden' : '').'">').'<span class="fa fa-info-circle" title="'.dol_escape_htmltag($admin ? $langs->trans('InfoAdmin') : $langs->trans('Note')).'"></span> ';
$fa = 'info-circle';
if ($picto == 'warning') {
$fa = 'exclamation-triangle';
}
$result = ($nodiv ? '' : '<div class="wordbreak '.$class.($morecss ? ' '.$morecss : '').($textfordropdown ? ' hidden' : '').'">').'<span class="fa fa-'.$fa.'" title="'.dol_escape_htmltag($admin ? $langs->trans('InfoAdmin') : $langs->trans('Note')).'"></span> ';
$result .= dol_escape_htmltag($text, 1, 0, 'div,span,b,br,a');
$result .= ($nodiv ? '' : '</div>');