N°4468 - Add data-resource-id meta-data on all buttons

This commit is contained in:
Molkobain
2021-11-22 15:44:27 +01:00
parent f57785e422
commit bd52f4fefb
6 changed files with 13 additions and 6 deletions

View File

@@ -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;