diff --git a/application/ui.linkswidget.class.inc.php b/application/ui.linkswidget.class.inc.php index 4bbe2001f..0f754b84e 100644 --- a/application/ui.linkswidget.class.inc.php +++ b/application/ui.linkswidget.class.inc.php @@ -17,6 +17,7 @@ require_once(APPROOT.'application/displayblock.class.inc.php'); class UILinksWidget { protected $m_sClass; + protected $m_sClassLabel; protected $m_sAttCode; protected $m_sNameSuffix; protected $m_sInputId; @@ -24,6 +25,7 @@ class UILinksWidget protected $m_sExtKeyToRemote; protected $m_sExtKeyToMe; protected $m_sLinkedClass; + protected $m_sLinkedClassLabel; protected $m_sRemoteClass; protected $m_bDuplicatesAllowed; /** @var string[] list of editables attcodes */ @@ -46,6 +48,7 @@ class UILinksWidget public function __construct($sClass, $sAttCode, $sInputId, $sNameSuffix = '', $bDuplicatesAllowed = false) { $this->m_sClass = $sClass; + $this->m_sClassLabel = MetaModel::GetName($this->m_sClass); $this->m_sAttCode = $sAttCode; $this->m_sInputId = $sInputId; $this->m_sNameSuffix = $sNameSuffix; @@ -56,6 +59,7 @@ class UILinksWidget /** @var AttributeLinkedSetIndirect $oAttDef */ $oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sAttCode); $this->m_sLinkedClass = $oAttDef->GetLinkedClass(); + $this->m_sLinkedClassLabel = MetaModel::GetName($this->m_sLinkedClass); $this->m_sExtKeyToRemote = $oAttDef->GetExtKeyToRemote(); $this->m_sExtKeyToMe = $oAttDef->GetExtKeyToMe(); @@ -365,11 +369,21 @@ class UILinksWidget return $this->m_sClass; } + public function GetClassLabel(): string + { + return $this->m_sClassLabel; + } + public function GetLinkedClass(): string { return $this->m_sLinkedClass; } + public function GetLinkedClassLabel(): string + { + return $this->m_sLinkedClassLabel; + } + public function GetAttCode(): string { return $this->m_sAttCode; diff --git a/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig b/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig index ce42d0169..c62e86c9d 100644 --- a/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig +++ b/templates/application/links/indirect/block-object-picker-dialog/layout.ready.js.twig @@ -5,7 +5,7 @@ $('#dlg_{{ oUIBlock.oUILinksWidget.GetLinkedSetId() }}').dialog({ width: $(window).width()*0.8, height: $(window).height()*0.8, - title:"{{ 'UI:AddObjectsOf_Class_LinkedWith_Class'|dict_format(oUIBlock.oUILinksWidget.GetLinkedClass(), oUIBlock.oUILinksWidget.GetClass()) }}" , + title:"{{ 'UI:AddObjectsOf_Class_LinkedWith_Class'|dict_format(oUIBlock.oUILinksWidget.GetLinkedClassLabel(), oUIBlock.oUILinksWidget.GetClassLabel()) }}" , autoOpen: false, modal: true, resizeStop: oWidget{{ oUIBlock.oUILinksWidget.GetInputId() }}.UpdateSizes,