From 4fbd73da415a81e654fdf3aac1f6bc871bf276a1 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Thu, 7 Mar 2024 19:00:11 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B07326=20-=20JS=20error=20in=20editing=20o?= =?UTF-8?q?bject=20when=20a=20tab=20with=20list=20is=20deleted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index dd609e5a38..98550484a8 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -759,10 +759,11 @@ public function DisplayBareRelations(WebPage $oPage, $bEditMode = false) if ($bEditMode && (!$bReadOnly)) { $sInputId = $this->m_iFormId.'_'.$sAttCode; $sDisplayValue = ''; // not used - $sHTMLValue = "".self::GetFormElementForField($oPage, $sClass, $sAttCode, - $oAttDef, $oLinkSet, $sDisplayValue, $sInputId, '', $iFlags, $aArgs).''; + $oDiv=UIContentBlockUIBlockFactory::MakeStandard('field_'.$sInputId); + $oLinkBlock = self::GetBlockFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $oLinkSet, $sDisplayValue, $sInputId, '', $iFlags, $aArgs); + $oDiv->AddSubBlock($oLinkBlock); $this->AddToFieldsMap($sAttCode, $sInputId); - $oPage->add($sHTMLValue); + $oPage->AddUiBlock($oDiv); } else { if ($oAttDef->IsIndirect()) { $oBlockLinkSetViewTable = new BlockIndirectLinkSetViewTable($oPage, $this, $sClass, $sAttCode, $oAttDef, $bReadOnly);