Merge branch 'Fix_dolGetButtonAction' of github.com:atm-GregM/dolibarr into updateButtonsGregM

This commit is contained in:
GregM 2022-02-23 15:37:36 +01:00
commit 6a8b20b3c0

View File

@ -9954,7 +9954,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
$class = 'butAction';
if ($actionType == 'danger' || $actionType == 'delete') {
$class = 'butActionDelete';
if (strpos($url, 'token=') === false) $url .= '&token='.newToken();
if (!empty($url) && strpos($url, 'token=') === false) $url .= '&token='.newToken();
}
$attr = array(
@ -9965,6 +9965,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
if (empty($html)) {
$html = $label;
$attr['title'] = ''; // if html not set, leave label on title is redundant
} else {
$attr['aria-label'] = $label;
}