mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Advanced Search: Links n:n
SVN:b1162[5447]
This commit is contained in:
@@ -403,6 +403,7 @@ EOF
|
||||
$oFilter->AddCondition('id', $aAlreadyLinkedIds, 'NOTIN');
|
||||
}
|
||||
$this->SetSearchDefaultFromContext($oCurrentObj, $oFilter);
|
||||
|
||||
$oBlock = new DisplayBlock($oFilter, 'search', false);
|
||||
$sHtml .= $oBlock->GetDisplay($oPage, "SearchFormToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}",
|
||||
array(
|
||||
@@ -412,7 +413,8 @@ EOF
|
||||
'table_inner_id' => "ResultsToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}",
|
||||
'selection_mode' => true,
|
||||
'json' => $sJson,
|
||||
'cssCount' => '#count_'.$this->m_sAttCode.$this->m_sNameSuffix
|
||||
'cssCount' => '#count_'.$this->m_sAttCode.$this->m_sNameSuffix,
|
||||
'query_params' => json_encode($oFilter->GetInternalParams()),
|
||||
));
|
||||
$sHtml .= "<form id=\"ObjectsAddForm_{$this->m_sAttCode}{$this->m_sNameSuffix}\">\n";
|
||||
$sHtml .= "<div id=\"SearchResultsToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}\" style=\"vertical-align:top;background: #fff;height:100%;overflow:auto;padding:0;border:0;\">\n";
|
||||
|
||||
@@ -73,7 +73,15 @@ try
|
||||
$sJson = json_encode($aJson);
|
||||
$oWizardHelper = WizardHelper::FromJSON($sJson);
|
||||
$oObj = $oWizardHelper->GetTargetObject();
|
||||
$aExtraParams['query_params'] = array('this' => $oObj);
|
||||
if (array_key_exists('query_params', $aExtraParams))
|
||||
{
|
||||
$aExtraParams['query_params'] = json_decode($aExtraParams['query_params'], true);
|
||||
$aExtraParams['query_params']['this'] = $oObj;
|
||||
}
|
||||
else
|
||||
{
|
||||
$aExtraParams['query_params'] = array('this' => $oObj);
|
||||
}
|
||||
|
||||
|
||||
// // Current extkey value, so we can display event if it is not available anymore (eg. archived).
|
||||
|
||||
Reference in New Issue
Block a user