N°3573 - Allow disabling buttons

This commit is contained in:
Eric
2021-06-30 17:03:22 +02:00
parent 94f662c71a
commit ff760dacbe
3 changed files with 24 additions and 24 deletions

View File

@@ -77,6 +77,8 @@ class Button extends UIBlock
protected $sJsCode;
/** @var string $sOnClickJsCode */
protected $sOnClickJsCode;
/** @var bool $bIsDisabled */
protected $bIsDisabled;
/**
* Button constructor.
@@ -102,6 +104,7 @@ class Button extends UIBlock
$this->sJsCode = $sJsCode;
$this->sOnClickJsCode = $sOnClickJsCode;
$this->aDataAttributes = ['role' => 'ibo-button'];
$this->bIsDisabled = false;
}
/**
@@ -240,4 +243,24 @@ class Button extends UIBlock
return $this;
}
/**
* @return bool
*/
public function IsDisabled()
{
return $this->bIsDisabled;
}
/**
* @param bool $bIsDisabled
*
* @return $this
*/
public function SetIsDisabled(bool $bIsDisabled)
{
$this->bIsDisabled = $bIsDisabled;
return $this;
}
}