mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
N°4468 - Add data-resource-id meta-data on all buttons
This commit is contained in:
@@ -94,6 +94,11 @@ class Button extends UIBlock
|
||||
*/
|
||||
public function __construct(string $sLabel, string $sId = null, string $sTooltip = '', string $sIconClass = '', string $sActionType = self::DEFAULT_ACTION_TYPE, string $sColorScheme = self::DEFAULT_COLOR_SCHEME, string $sJsCode = '', string $sOnClickJsCode = '')
|
||||
{
|
||||
// We only use resource ID (not sanitized) on button for now, but this might be reworked back into \UIBlock if needed
|
||||
if (!is_null($sId)) {
|
||||
$this->AddDataAttribute('resource-id', $sId);
|
||||
}
|
||||
|
||||
parent::__construct($sId);
|
||||
|
||||
$this->sLabel = $sLabel;
|
||||
|
||||
@@ -107,7 +107,7 @@ abstract class UIBlock implements iUIBlock
|
||||
/** @var array Cache for the CSS classes of a block inheritance. Key is the block class, value is an array of CSS classes */
|
||||
private static $aBlocksInheritanceCSSClassesCache = [];
|
||||
|
||||
/** @var string $sId */
|
||||
/** @var string ID of the block */
|
||||
protected $sId;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user