N°729 Form prefill : Allow to overload new methods in order to prefill search forms, creation forms and transition forms

SVN:trunk[5609]
This commit is contained in:
Stephen Abello
2018-04-05 08:17:19 +00:00
parent 320c7646f0
commit a84748a544
9 changed files with 166 additions and 43 deletions

View File

@@ -458,6 +458,9 @@ class ObjectController extends AbstractController
// Retrieve action rules information to auto-fill the form if available
// Preparing object
$oApp['context_manipulator']->PrepareObject($aActionRules, $oObject);
$aPrefillFormParam = array( 'user' => $_SESSION["auth_user"],
'origin' => 'portal');
$oObject->PrefillForm('creation_from_0', $aPrefillFormParam);
}
else
{
@@ -515,6 +518,13 @@ class ObjectController extends AbstractController
$aFormData['buttons']['submit']['label'] = Dict::S('Portal:Button:Apply');
}
}
else
{
$aPrefillFormParam = array('user' => $_SESSION["auth_user"],
'origin' => 'portal',
'stimulus' => $oRequestParams->get('apply_stimulus')['code']);
$oObject->PrefillForm('state_change', $aPrefillFormParam);
}
// Preparing callback urls
$aCallbackUrls = $oApp['context_manipulator']->GetCallbackUrls($oApp, $aActionRules, $oObject, $bModal);