diff --git a/application/ui.linkswidget.class.inc.php b/application/ui.linkswidget.class.inc.php
index 02804fc5db..970127b8b4 100644
--- a/application/ui.linkswidget.class.inc.php
+++ b/application/ui.linkswidget.class.inc.php
@@ -39,6 +39,7 @@ class UILinksWidget
protected $m_sLinkedClass;
protected $m_sRemoteClass;
protected $m_bDuplicatesAllowed;
+ /** @var string[] list of editables attcodes */
protected $m_aEditableFields;
protected $m_aTableConfig;
@@ -93,6 +94,7 @@ class UILinksWidget
'label' => MetaModel::GetName($this->m_sRemoteClass),
'description' => MetaModel::GetClassDescription($this->m_sRemoteClass),
);
+ $this->m_aEditableFields[] = $this->m_sExtKeyToRemote;
$aRemoteAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass($this->m_sRemoteClass);
foreach ($aRemoteAttDefsToDisplay as $oRemoteAttDef)
@@ -110,7 +112,7 @@ class UILinksWidget
*
* @param WebPage $oP Web page used for the ouput
* @param DBObject $oLinkedObj Remote object
- * @param mixed $linkObjOrId Either the object linked or a unique number for new link records to add
+ * @param DBObject|int $linkObjOrId Either the lnk object or a unique number for new link records to add
* @param array $aArgs Extra context arguments
* @param DBObject $oCurrentObj The object to which all the elements of the linked set refer to
* @param int $iUniqueId A unique identifier of new links
@@ -152,15 +154,17 @@ class UILinksWidget
$aRow['form::checkbox'] = "m_iInputId.".OnSelectChange();\" value=\"$iKey\">";
foreach($this->m_aEditableFields as $sFieldCode)
{
- $sFieldId = $this->m_iInputId.'_'.$sFieldCode.'['.$linkObjOrId->GetKey().']';
- $sSafeId = utils::GetSafeId($sFieldId);
- $sValue = $linkObjOrId->Get($sFieldCode);
- $sDisplayValue = $linkObjOrId->GetEditValue($sFieldCode);
- $oAttDef = MetaModel::GetAttributeDef($this->m_sLinkedClass, $sFieldCode);
- $aRow[$sFieldCode] = '