forked from Wavyzz/dolibarr
Debug v20
This commit is contained in:
@@ -11915,18 +11915,23 @@ function roundUpToNextMultiple($n, $x = 5)
|
||||
/**
|
||||
* Function dolGetBadge
|
||||
*
|
||||
* @param string $label label of badge no html : use in alt attribute for accessibility
|
||||
* @param string $html optional : label of badge with html
|
||||
* @param string $type type of badge : Primary Secondary Success Danger Warning Info Light Dark status0 status1 status2 status3 status4 status5 status6 status7 status8 status9
|
||||
* @param ''|'pill'|'dot' $mode Default '' , 'pill', 'dot'
|
||||
* @param string $url the url for link
|
||||
* @param string $label label of badge no html : use in alt attribute for accessibility
|
||||
* @param string $html optional : label of badge with html
|
||||
* @param string $type type of badge : Primary Secondary Success Danger Warning Info Light Dark status0 status1 status2 status3 status4 status5 status6 status7 status8 status9
|
||||
* @param ''|'pill'|'dot' $mode Default '' , 'pill', 'dot'
|
||||
* @param string $url the url for link
|
||||
* @param array<string,mixed> $params Various params for future : recommended rather than adding more function arguments. array('attr'=>array('title'=>'abc'))
|
||||
* @return string Html badge
|
||||
* @return string Html badge
|
||||
*/
|
||||
function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '', $params = array())
|
||||
{
|
||||
$csstouse = 'badge';
|
||||
$csstouse .= (!empty($mode) ? ' badge-'.$mode : '');
|
||||
$csstouse .= (!empty($type) ? ' badge-'.$type : '');
|
||||
$csstouse .= (empty($params['css']) ? '' : ' '.$params['css']);
|
||||
|
||||
$attr = array(
|
||||
'class' => 'badge '.(!empty($mode) ? ' badge-'.$mode : '').(!empty($type) ? ' badge-'.$type : '').(empty($params['css']) ? '' : ' '.$params['css'])
|
||||
'class' => $csstouse
|
||||
);
|
||||
|
||||
if (empty($html)) {
|
||||
|
||||
Reference in New Issue
Block a user