N°2847 - Datatable Fix external keys "undefined"

This commit is contained in:
Eric
2020-11-24 11:25:26 +01:00
parent f893603332
commit d9264e5181
2 changed files with 6 additions and 24 deletions

View File

@@ -6784,21 +6784,12 @@ class AttributeExternalKey extends AttributeDBFieldVoid
public function GetAsHTML($sValue, $oHostObject = null, $bLocalize = true)
{
if (!is_null($oHostObject))
{
if (!is_null($oHostObject)) {
return $oHostObject->GetAsHTML($this->GetCode(), $oHostObject);
}
return DBObject::MakeHyperLink($this->GetTargetClass(), $sValue);
}
public function GetRenderForDataTable(string $sClassAlias) :string
{
$oRemoteAtt = $this->GetFinalAttDef();
$sTargetClass = $oRemoteAtt->GetTargetClass();
$sRenderFunction = "return '<a class=\'object-ref-link\' href= \'UI.php?operation=details&class=".$sTargetClass."&id='+data+'\'>'+row['".$sClassAlias."/".$this->GetCode()."_friendlyname']+'</a>' ;";
return $sRenderFunction;
}
}
/**