CustomFields: support of RadioField or SelectObject +"radio" control

SVN:trunk[3987]
This commit is contained in:
Romain Quetiez
2016-04-06 09:21:01 +00:00
parent 0259071bdd
commit fd124ef53b
5 changed files with 103 additions and 4 deletions

View File

@@ -33,12 +33,18 @@ class SelectObjectField extends Field
protected $iMaximumComboLength;
protected $iMinAutoCompleteChars;
protected $iControlType;
const CONTROL_SELECT = 1;
const CONTROL_RADIO_VERTICAL = 2;
public function __construct($sId, Closure $onFinalizeCallback = null)
{
parent::__construct($sId, $onFinalizeCallback);
$this->oSearch = null;
$this->iMaximumComboLength = null;
$this->iMinAutoCompleteChars = 3;
$this->iControlType = self::CONTROL_SELECT;
}
public function SetSearch(DBSearch $oSearch)
@@ -56,6 +62,11 @@ class SelectObjectField extends Field
$this->iMinAutoCompleteChars = $iMinAutoCompleteChars;
}
public function SetControlType($iControlType)
{
$this->iControlType = $iControlType;
}
/**
* Sets if the field is mandatory or not.
* Setting the value will automatically add/remove a MandatoryValidator to the Field
@@ -100,4 +111,9 @@ class SelectObjectField extends Field
{
return $this->iMinAutoCompleteChars;
}
public function GetControlType()
{
return $this->iControlType;
}
}