mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°2044: Enable Search form prefill when adding objects to 1:n
This commit is contained in:
@@ -409,8 +409,16 @@ try
|
||||
$oWizardHelper = WizardHelper::FromJSON($sJson);
|
||||
$oObj = $oWizardHelper->GetTargetObject();
|
||||
}
|
||||
$oAppContext = new ApplicationContext();
|
||||
$aPrefillFormParam = array( 'user' => $_SESSION["auth_user"],
|
||||
'context' => $oAppContext->GetAsHash(),
|
||||
'att_code' => $sAttCode,
|
||||
'origin' => 'console',
|
||||
'source_obj' => $oObj,
|
||||
);
|
||||
$aPrefillFormParam['dest_class'] = ($oObj === null ? '' : $oObj->Get($sAttCode)->GetClass());
|
||||
$oWidget = new UILinksWidgetDirect($sClass, $sAttCode, $iInputId);
|
||||
$oWidget->SearchObjectsToAdd($oPage, $sRealClass, $aAlreadyLinked, $oObj);
|
||||
$oWidget->SearchObjectsToAdd($oPage, $sRealClass, $aAlreadyLinked, $oObj, $aPrefillFormParam);
|
||||
break;
|
||||
|
||||
// ui.linksdirectwidget
|
||||
|
||||
Reference in New Issue
Block a user