mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Debug v20 - fix warnings
This commit is contained in:
@@ -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>');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user