mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Custom fields: check data against the form prior to recording (do not rely solely on the HTML form)
SVN:trunk[3963]
This commit is contained in:
@@ -59,21 +59,21 @@ class ormCustomFieldsValue
|
||||
public function GetAsHTML($bLocalize = true)
|
||||
{
|
||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this->GetValues());
|
||||
return $oHandler->GetAsHTML($this->aCurrentValues, $bLocalize);
|
||||
}
|
||||
|
||||
public function GetAsXML($bLocalize = true)
|
||||
{
|
||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this->GetValues());
|
||||
return $oHandler->GetAsXML($this->aCurrentValues, $bLocalize);
|
||||
}
|
||||
|
||||
public function GetAsCSV($sSeparator = ',', $sTextQualifier = '"', $bLocalize = true)
|
||||
{
|
||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this->GetValues());
|
||||
return $oHandler->GetAsCSV($this->aCurrentValues, $sSeparator = ',', $sTextQualifier = '"', $bLocalize = true);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class ormCustomFieldsValue
|
||||
public function GetForTemplate($sVerb, $bLocalize = true)
|
||||
{
|
||||
$oAttDef = MetaModel::GetAttributeDef(get_class($this->oHostObject), $this->sAttCode);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this);
|
||||
$oHandler = $oAttDef->GetHandler($this->oHostObject, $this->GetValues());
|
||||
return 'template...verb='.$sVerb.' sur "'.json_encode($this->aCurrentValues).'"';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user