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 7, 2024
1 parent 7b24df0 commit ed92956
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/cmdbabstract.class.inc.php
Original file line number Diff line number Diff line change
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 ed92956

Please sign in to comment.