mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 15:08:45 +02:00
CustomFields: support of RadioField or SelectObject +"radio" control
SVN:trunk[3987]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user