mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Clean code
This commit is contained in:
@@ -12790,7 +12790,7 @@ function getFieldErrorIcon($fieldValidationErrorMsg)
|
||||
* @param string $iconClass class for icon element (Example: 'fa fa-file')
|
||||
* @param string $url the url for link
|
||||
* @param string $id attribute id of button
|
||||
* @param int<-2,2> $status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled, -2 disable Other reason use param $helpText as tooltip help
|
||||
* @param int<-2,2> $status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled (deprecated, use -2 instead), -2 disable Other reason use param $helpText as tooltip help
|
||||
* @param array<string,mixed> $params various parameters for future : recommended rather than adding more function arguments
|
||||
* @return string html button
|
||||
*/
|
||||
@@ -12866,12 +12866,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
|
||||
// TODO : add a hook
|
||||
|
||||
// escape all attribute
|
||||
$attr = array_map('dol_escape_htmltag', $attr);
|
||||
|
||||
$TCompiledAttr = array();
|
||||
foreach ($attr as $key => $value) {
|
||||
$TCompiledAttr[] = $key.'="'.$value.'"';
|
||||
$TCompiledAttr[] = $key.'="'.dolPrintHTMLForAttribute($value).'"';
|
||||
}
|
||||
|
||||
$compiledAttributes = (empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr));
|
||||
|
||||
Reference in New Issue
Block a user