Portal: enable adding dependent attributes in the request creation form -reintegrated from trunk

SVN:1.2.1[2272]
This commit is contained in:
Romain Quetiez
2012-10-17 12:17:53 +00:00
parent b6f6e7a1ff
commit dd0c22708c
2 changed files with 7 additions and 4 deletions

View File

@@ -213,6 +213,8 @@ EOF
EOF EOF
); );
// For Wizard helper to process the ajax replies
$this->add('<div id="ajax_content"></div>');
} }
public function SetCurrentTab($sTabLabel = '') public function SetCurrentTab($sTabLabel = '')

View File

@@ -245,8 +245,9 @@ function RequestCreationForm($oP, $oUserOrg)
} }
$aArgs = array('this' => $oRequest); $aArgs = array('this' => $oRequest);
$aFieldsMap[$sAttCode] = 'attr_'.$sAttCode; $sInputId = 'attr_'.$sAttCode;
$sValue = $oRequest->GetFormElementForField($oP, get_class($oRequest), $sAttCode, $oAttDef, $value, '', 'attr_'.$sAttCode, '', $iFlags, $aArgs); $aFieldsMap[$sAttCode] = $sInputId;
$sValue = "<span id=\"field_{$sInputId}\">".$oRequest->GetFormElementForField($oP, get_class($oRequest), $sAttCode, $oAttDef, $value, '', 'attr_'.$sAttCode, '', $iFlags, $aArgs).'</span>';
$aDetails[] = array('label' => '<span>'.$oAttDef->GetLabel().'</span>', 'value' => $sValue); $aDetails[] = array('label' => '<span>'.$oAttDef->GetLabel().'</span>', 'value' => $sValue);
} }
if (!class_exists('AttachmentPlugIn')) if (!class_exists('AttachmentPlugIn'))