forked from Wavyzz/dolibarr
Debug v21
This commit is contained in:
@@ -1403,7 +1403,8 @@ class FormFile
|
|||||||
// Show title of list of existing files
|
// Show title of list of existing files
|
||||||
$morehtmlright = '';
|
$morehtmlright = '';
|
||||||
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
|
||||||
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }', '', $permtoeditline);
|
$url = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }';
|
||||||
|
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $url, '', $permtoeditline);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((empty($useinecm) || $useinecm == 3 || $useinecm == 6) && $title != 'none') {
|
if ((empty($useinecm) || $useinecm == 3 || $useinecm == 6) && $title != 'none') {
|
||||||
|
|||||||
@@ -12874,7 +12874,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
|||||||
|
|
||||||
$TCompiledAttr = array();
|
$TCompiledAttr = array();
|
||||||
foreach ($attr as $key => $value) {
|
foreach ($attr as $key => $value) {
|
||||||
$TCompiledAttr[] = $key.'="'.dolPrintHTMLForAttribute($value).'"';
|
$TCompiledAttr[] = $key.'="'.dol_escape_htmltag($value).'"'; // Do not use dolPrintHTMLForAttribute() here, we must accept "javascript:string"
|
||||||
}
|
}
|
||||||
|
|
||||||
$compiledAttributes = (empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr));
|
$compiledAttributes = (empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr));
|
||||||
|
|||||||
Reference in New Issue
Block a user