mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°729 Form prefill : Minor fix for prefillSeachForm
SVN:trunk[5665]
This commit is contained in:
@@ -418,7 +418,7 @@ EOF
|
||||
* @throws DictExceptionMissingString
|
||||
* @throws Exception
|
||||
*/
|
||||
public function GetObjectPickerDialog($oPage, $oCurrentObj, $sJson, $aAlreadyLinkedIds = array(), $aPreFillFormParam = array())
|
||||
public function GetObjectPickerDialog($oPage, $oCurrentObj, $sJson, $aAlreadyLinkedIds = array(), $aPrefillFormParam = array())
|
||||
{
|
||||
$sHtml = "<div class=\"wizContainer\" style=\"vertical-align:top;\">\n";
|
||||
|
||||
@@ -439,8 +439,9 @@ EOF
|
||||
if(!empty($oCurrentObj))
|
||||
{
|
||||
$this->SetSearchDefaultFromContext($oCurrentObj, $oFilter);
|
||||
$aPreFillFormParam['filter'] = $oFilter;
|
||||
$oCurrentObj->PrefillForm('search', $aPreFillFormParam);
|
||||
$aPrefillFormParam['filter'] = $oFilter;
|
||||
$aPrefillFormParam['dest_class'] = $this->m_sRemoteClass;
|
||||
$oCurrentObj->PrefillForm('search', $aPrefillFormParam);
|
||||
}
|
||||
$oBlock = new DisplayBlock($oFilter, 'search', false);
|
||||
$sHtml .= $oBlock->GetDisplay($oPage, "SearchFormToAdd_{$this->m_sAttCode}{$this->m_sNameSuffix}",
|
||||
|
||||
@@ -303,14 +303,9 @@ try
|
||||
$aPrefillFormParam = array( 'user' => $_SESSION["auth_user"],
|
||||
'context' => $oAppContext->GetAsHash(),
|
||||
'att_code' => $sAttCode,
|
||||
'origin' => 'console'
|
||||
'origin' => 'console',
|
||||
'source_obj' => $oObj
|
||||
);
|
||||
if (!empty($sJson))
|
||||
{
|
||||
$oWizardHelper = WizardHelper::FromJSON($sJson);
|
||||
$oSourceObj = $oWizardHelper->GetTargetObject();
|
||||
$aPrefillFormParam['source_obj'] = $oSourceObj;
|
||||
}
|
||||
$aAlreadyLinked = utils::ReadParam('aAlreadyLinked', array());
|
||||
$oWidget->GetObjectPickerDialog($oPage, $oObj, $sJson, $aAlreadyLinked, $aPrefillFormParam);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user