diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a25fd098f9a..4bbd030b1eb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8123,14 +8123,22 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = $attr['href'] = ''; } - if(empty($id)){ + if(!empty($id)){ $attr['id'] = $id; } // Override attr if(!empty($params['attr']) && is_array($params['attr'])){ foreach($params['attr'] as $key => $value){ - $attr[$key] = $value; + if($key == 'class'){ + $attr['class'].= ' '.$value; + } + elseif($key == 'classOverride'){ + $attr['class'] = $value; + } + else{ + $attr[$key] = $value; + } } } @@ -8202,10 +8210,10 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $attr['href'] = ''; - if($status == -1){ // Not enough permissions + if($status == -1){ // disable $attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("FeatureDisabled")); } - elseif($status == 0){ // disable + elseif($status == 0){ // Not enough permissions $attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")); } }