mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 23:18:43 +02:00
- Added support for ExternalKey, LinkedSet, linkedSetIndirect, CaseLog to the new portal
- Fixed some bugs on the customfields integration with he portal SVN:trunk[4003]
This commit is contained in:
@@ -26,14 +26,16 @@ use Combodo\iTop\Form\Validator\NotEmptyExtKeyValidator;
|
||||
/**
|
||||
* Description of SelectObjectField
|
||||
*
|
||||
* @author Romain Quetiez <romain.quetiez@combodo.com>
|
||||
*/
|
||||
class SelectObjectField extends Field
|
||||
{
|
||||
protected $oSearch;
|
||||
protected $iMaximumComboLength;
|
||||
protected $iMinAutoCompleteChars;
|
||||
|
||||
protected $bHierarchical;
|
||||
protected $iControlType;
|
||||
protected $sSearchEndpoint;
|
||||
|
||||
const CONTROL_SELECT = 1;
|
||||
const CONTROL_RADIO_VERTICAL = 2;
|
||||
@@ -44,22 +46,33 @@ class SelectObjectField extends Field
|
||||
$this->oSearch = null;
|
||||
$this->iMaximumComboLength = null;
|
||||
$this->iMinAutoCompleteChars = 3;
|
||||
$this->bHierarchical = false;
|
||||
$this->iControlType = self::CONTROL_SELECT;
|
||||
$this->sSearchEndpoint = null;
|
||||
}
|
||||
|
||||
public function SetSearch(DBSearch $oSearch)
|
||||
{
|
||||
$this->oSearch = $oSearch;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function SetMaximumComboLength($iMaximumComboLength)
|
||||
{
|
||||
$this->iMaximumComboLength = $iMaximumComboLength;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function SetMinAutoCompleteChars($iMinAutoCompleteChars)
|
||||
{
|
||||
$this->iMinAutoCompleteChars = $iMinAutoCompleteChars;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function SetHierarchical($bHierarchical)
|
||||
{
|
||||
$this->bHierarchical = $bHierarchical;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function SetControlType($iControlType)
|
||||
@@ -67,6 +80,12 @@ class SelectObjectField extends Field
|
||||
$this->iControlType = $iControlType;
|
||||
}
|
||||
|
||||
public function SetSearchEndpoint($sSearchEndpoint)
|
||||
{
|
||||
$this->sSearchEndpoint = $sSearchEndpoint;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if the field is mandatory or not.
|
||||
* Setting the value will automatically add/remove a MandatoryValidator to the Field
|
||||
@@ -112,8 +131,18 @@ class SelectObjectField extends Field
|
||||
return $this->iMinAutoCompleteChars;
|
||||
}
|
||||
|
||||
public function GetHierarchical()
|
||||
{
|
||||
return $this->bHierarchical;
|
||||
}
|
||||
|
||||
public function GetControlType()
|
||||
{
|
||||
return $this->iControlType;
|
||||
}
|
||||
|
||||
public function GetSearchEndpoint()
|
||||
{
|
||||
return $this->sSearchEndpoint;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user