Merge pull request #7761 from hregis/develop_member
Fix: broken feature (add more attr and css class)
This commit is contained in:
commit
1e939ec90c
@ -2719,10 +2719,11 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo
|
||||
* @param int $srconly Return only content of the src attribute of img.
|
||||
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
||||
* @param string $alt Force alt for bind peoplae
|
||||
* @param string $morecss Add more class css on img tag (For example 'myclascss')
|
||||
* @return string Return img tag
|
||||
* @see #img_object, #img_picto_common
|
||||
*/
|
||||
function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly=0, $notitle=0, $alt='')
|
||||
function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly=0, $notitle=0, $alt='', $morecss='')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@ -2744,7 +2745,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
|
||||
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
|
||||
$enabledisablehtml='';
|
||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'">';
|
||||
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
|
||||
$enabledisablehtml.='</span>';
|
||||
return $enabledisablehtml;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user