forked from Wavyzz/dolibarr
Debug v21
This commit is contained in:
@@ -12995,7 +12995,7 @@ function getFieldErrorIcon($fieldValidationErrorMsg)
|
||||
*/
|
||||
function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $url = '', $id = '', $status = 1, $params = array())
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $user;
|
||||
|
||||
// Actually this conf is used in css too for external module compatibility and smooth transition to this function
|
||||
if (getDolGlobalString('MAIN_BUTTON_HIDE_UNAUTHORIZED') && (!$user->admin) && $status <= 0) {
|
||||
@@ -13032,9 +13032,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
$attr['href'] = '';
|
||||
|
||||
if ($status == -1) { // disable
|
||||
$attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("FeatureDisabled"));
|
||||
$attr['title'] = $langs->transnoentitiesnoconv("FeatureDisabled");
|
||||
} elseif ($status == 0) { // Not enough permissions
|
||||
$attr['title'] = dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions"));
|
||||
$attr['title'] = $langs->transnoentitiesnoconv("NotEnoughPermissions");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13065,6 +13065,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
|
||||
// TODO : add a hook
|
||||
|
||||
// Generate attributes with escapement
|
||||
$TCompiledAttr = array();
|
||||
foreach ($attr as $key => $value) {
|
||||
$TCompiledAttr[] = $key.'="'.dol_escape_htmltag($value).'"'; // Do not use dolPrintHTMLForAttribute() here, we must accept "javascript:string"
|
||||
|
||||
Reference in New Issue
Block a user