Skip to content

Commit

Permalink
Fix Override Attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-john committed Jun 13, 2019
1 parent 0ef9a88 commit e7d81a6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -8130,7 +8130,15 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
// 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;
}
}
}

Expand Down Expand Up @@ -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"));
}
}
Expand Down

0 comments on commit e7d81a6

Please sign in to comment.