mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
When searching objects to add to the current object (n:n relationship), set the default search params in order to stay in the current silo.
SVN:1.2[1724]
This commit is contained in:
@@ -73,7 +73,6 @@ try
|
||||
$sSelectMode = utils::ReadParam('select_mode', '');
|
||||
$bDisplayKey = utils::ReadParam('display_key', 'true') == 'true';
|
||||
$aList = utils::ReadParam('display_list', array());
|
||||
|
||||
$sClassName = $oFilter->GetClass();
|
||||
//$aList = cmdbAbstractObject::FlattenZList(MetaModel::GetZListItems($sClassName, 'list'));
|
||||
|
||||
@@ -169,6 +168,28 @@ try
|
||||
}
|
||||
break;
|
||||
|
||||
// ui.linkswidget
|
||||
case 'addObjects':
|
||||
$oPage->SetContentType('text/html');
|
||||
$sAttCode = utils::ReadParam('sAttCode', '');
|
||||
$iInputId = utils::ReadParam('iInputId', '');
|
||||
$sSuffix = utils::ReadParam('sSuffix', '');
|
||||
$bDuplicates = (utils::ReadParam('bDuplicates', 'false') == 'false') ? false : true;
|
||||
$sJson = utils::ReadParam('json', '', false, 'raw_data');
|
||||
if (!empty($sJson))
|
||||
{
|
||||
$oWizardHelper = WizardHelper::FromJSON($sJson);
|
||||
$oObj = $oWizardHelper->GetTargetObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Search form: no current object
|
||||
$oObj = null;
|
||||
}
|
||||
$oWidget = new UILinksWidget($sClass, $sAttCode, $iInputId, $sSuffix, $bDuplicates);
|
||||
$oWidget->GetObjectPickerDialog($oPage, $oObj);
|
||||
break;
|
||||
|
||||
// ui.linkswidget
|
||||
case 'searchObjectsToAdd':
|
||||
$oPage->SetContentType('text/html');
|
||||
|
||||
Reference in New Issue
Block a user