Allow inputs to be disabled and readonly

This commit is contained in:
Stephen Abello
2021-03-15 16:02:58 +01:00
parent 6b6db02567
commit fac6d1741e
2 changed files with 43 additions and 1 deletions

View File

@@ -21,6 +21,9 @@ class Input extends AbstractInput
public const INPUT_HIDDEN = 'hidden';
protected $bIsChecked = false;
protected $bIsDisabled = false;
protected $bIsReadonly = false;
/** @var string */
protected $sType;
@@ -60,4 +63,42 @@ class Input extends AbstractInput
{
return $this->bIsChecked;
}
/**
* @return bool
*/
public function IsDisabled()
{
return $this->bIsDisabled;
}
/**
* @param bool $bIsDisabled
*
* @return $this
*/
public function SetIsDisabled(bool $bIsDisabled)
{
$this->bIsDisabled = $bIsDisabled;
return $this;
}
/**
* @return bool
*/
public function IsReadonly()
{
return $this->bIsReadonly;
}
/**
* @param bool $bIsReadonly
*
* @return $this
*/
public function SetIsReadonly(bool $bIsReadonly)
{
$this->bIsReadonly = $bIsReadonly;
return $this;
}
}