mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-06 17:44:12 +01:00
Properly handle restrictions (e.g. AllowedValues) on objects that are used as n:n relationships managed via LinksWidget.
SVN:trunk[1684]
This commit is contained in:
@@ -1566,7 +1566,8 @@ EOF
|
||||
$aEventsList[] ='validate';
|
||||
$aEventsList[] ='change';
|
||||
$oWidget = new UILinksWidget($sClass, $sAttCode, $iId, $sNameSuffix, $oAttDef->DuplicatesAllowed(), $aArgs);
|
||||
$sHTMLValue = $oWidget->Display($oPage, $value, array(), '', $this);
|
||||
$oObj = isset($aArgs['this']) ? $aArgs['this'] : null;
|
||||
$sHTMLValue = $oWidget->Display($oPage, $value, array(), $sFormPrefix, $oObj);
|
||||
break;
|
||||
|
||||
case 'Document':
|
||||
|
||||
@@ -244,7 +244,7 @@ class UILinksWidget
|
||||
}
|
||||
$sHtmlValue .= $this->DisplayFormTable($oPage, $this->m_aTableConfig, $aForm);
|
||||
$sDuplicates = ($this->m_bDuplicatesAllowed) ? 'true' : 'false';
|
||||
$sWizHelper = 'oWizardHelper'.$this->m_sFormPrefix;
|
||||
$sWizHelper = 'oWizardHelper'.$sFormPrefix;
|
||||
$oPage->add_ready_script(<<<EOF
|
||||
oWidget{$this->m_iInputId} = new LinksWidget('{$this->m_sAttCode}{$this->m_sNameSuffix}', '{$this->m_sClass}', '{$this->m_sAttCode}', '{$this->m_iInputId}', '{$this->m_sNameSuffix}', $sDuplicates, $sWizHelper);
|
||||
oWidget{$this->m_iInputId}.Init();
|
||||
|
||||
Reference in New Issue
Block a user