Skip to content

Commit

Permalink
N°7326 - JS error in editing object when a tab with list is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
accognet committed Mar 11, 2024
1 parent 936edd6 commit 4fbd73d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/cmdbabstract.class.inc.php
Expand Up @@ -759,10 +759,11 @@ public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
if ($bEditMode && (!$bReadOnly)) {
$sInputId = $this->m_iFormId.'_'.$sAttCode;
$sDisplayValue = ''; // not used
$sHTMLValue = "<span id=\"field_{$sInputId}\">".self::GetFormElementForField($oPage, $sClass, $sAttCode,
$oAttDef, $oLinkSet, $sDisplayValue, $sInputId, '', $iFlags, $aArgs).'</span>';
$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);
Expand Down

0 comments on commit 4fbd73d

Please sign in to comment.