N°3819 - Input: Migrate request templates input to new UIBlock system

This commit is contained in:
acognet
2021-05-04 11:55:20 +02:00
parent a7040a911d
commit 16c9599739
8 changed files with 236 additions and 146 deletions

View File

@@ -22,11 +22,14 @@ class Select extends UIContentBlock
protected $sValue;
/** @var bool */
protected $bSubmitOnChange = false;
/** @var bool */
protected $bIsMultiple = false;
public function __construct(?string $sId = null)
{
parent::__construct($sId);
$this->bIsMultiple = false;
}
public function AddOption(SelectOption $oOption)
@@ -84,7 +87,25 @@ class Select extends UIContentBlock
public function SetSubmitOnChange(bool $bSubmitOnChange)
{
$this->bSubmitOnChange = $bSubmitOnChange;
return $this;
}
/**
* @return bool
*/
public function IsMultiple(): bool
{
return $this->bIsMultiple;
}
/**
* @param bool $bIsMultiple
*/
public function SetIsMultiple(bool $bIsMultiple): void
{
$this->bIsMultiple = $bIsMultiple;
}
}

View File

@@ -20,6 +20,8 @@ class TextArea extends AbstractInput
protected $iCols;
/** @var int */
protected $iRows;
/** @var bool */
protected $bIsDisabled;
public function __construct(string $sName, ?string $sValue, ?string $sId = null, ?int $iCols = null, ?int $iRows = null)
{
@@ -29,6 +31,7 @@ class TextArea extends AbstractInput
$this->sValue = $sValue;
$this->iCols = $iCols;
$this->iRows = $iRows;
$this->bIsDisabled = false;
}
public function GetCols(): ?int
@@ -64,4 +67,22 @@ class TextArea extends AbstractInput
return $this;
}
/**
* @return bool
*/
public function IsDisabled(): bool
{
return $this->bIsDisabled;
}
/**
* @param bool $bIsDisabled
*/
public function SetIsDisabled(bool $bIsDisabled): void
{
$this->bIsDisabled = $bIsDisabled;
}
}