mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/3.2' into develop
This commit is contained in:
@@ -152,7 +152,7 @@ class UserProfileBrickController extends BrickController
|
|||||||
// Preparing forms
|
// Preparing forms
|
||||||
$aData['forms']['contact'] = $this->ObjectFormHandlerHelper->HandleForm($oRequest, $sFormMode, $sCurContactClass,
|
$aData['forms']['contact'] = $this->ObjectFormHandlerHelper->HandleForm($oRequest, $sFormMode, $sCurContactClass,
|
||||||
$sCurContactId,
|
$sCurContactId,
|
||||||
$oBrick->GetForm());
|
);
|
||||||
$aData['forms']['preferences'] = $this->HandlePreferencesForm($oRequest, $sFormMode);
|
$aData['forms']['preferences'] = $this->HandlePreferencesForm($oRequest, $sFormMode);
|
||||||
// - If user can change password, we display the form
|
// - If user can change password, we display the form
|
||||||
$aData['forms']['password'] = (UserRights::CanChangePassword()) ? $this->HandlePasswordForm($oRequest, $sFormMode) : null;
|
$aData['forms']['password'] = (UserRights::CanChangePassword()) ? $this->HandlePasswordForm($oRequest, $sFormMode) : null;
|
||||||
@@ -428,7 +428,7 @@ class UserProfileBrickController extends BrickController
|
|||||||
'sObjectField' => $sPictureAttCode,
|
'sObjectField' => $sPictureAttCode,
|
||||||
'cache' => 86400,
|
'cache' => 86400,
|
||||||
's' => $oOrmDoc->GetSignature(),
|
's' => $oOrmDoc->GetSignature(),
|
||||||
]);
|
]);
|
||||||
$aFormData['validation'] = array(
|
$aFormData['validation'] = array(
|
||||||
'valid' => true,
|
'valid' => true,
|
||||||
'messages' => array(),
|
'messages' => array(),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -124,17 +124,15 @@ class ObjectFormHandlerHelper
|
|||||||
* @throws \OQLException
|
* @throws \OQLException
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function HandleForm(Request $oRequest, $sMode, $sObjectClass, $sObjectId = null, $aFormProperties = null)
|
public function HandleForm(Request $oRequest, $sMode, $sObjectClass, $sObjectId = null, array $aFormProperties = null)
|
||||||
{
|
{
|
||||||
$aFormData = array();
|
$aFormData = array();
|
||||||
$sOperation = $this->oRequestManipulator->ReadParam('operation', '');
|
$sOperation = $this->oRequestManipulator->ReadParam('operation', '');
|
||||||
$bModal = ($oRequest->isXmlHttpRequest() && empty($sOperation));
|
$bModal = ($oRequest->isXmlHttpRequest() && empty($sOperation));
|
||||||
|
|
||||||
// - Retrieve form properties
|
// - Retrieve form properties
|
||||||
if ($aFormProperties === null)
|
$aFormProperties = $aFormProperties ?? ApplicationHelper::GetLoadedFormFromClass($this->aCombodoPortalInstanceConf['forms'], $sObjectClass, $sMode);
|
||||||
{
|
|
||||||
$aFormProperties = ApplicationHelper::GetLoadedFormFromClass($this->aCombodoPortalInstanceConf['forms'], $sObjectClass, $sMode);
|
|
||||||
}
|
|
||||||
// - Create and
|
// - Create and
|
||||||
if (empty($sOperation))
|
if (empty($sOperation))
|
||||||
{
|
{
|
||||||
@@ -281,7 +279,8 @@ class ObjectFormHandlerHelper
|
|||||||
->SetActionRulesToken($sActionRulesToken)
|
->SetActionRulesToken($sActionRulesToken)
|
||||||
->SetRenderer($oFormRenderer)
|
->SetRenderer($oFormRenderer)
|
||||||
->SetFormProperties($aFormProperties);
|
->SetFormProperties($aFormProperties);
|
||||||
|
$oFormManager->PrepareFormAndHTMLDocument();
|
||||||
|
$oFormManager->PrepareFields();
|
||||||
$oFormManager->Build();
|
$oFormManager->Build();
|
||||||
$aFormData['hidden_fields'] = $oFormManager->GetHiddenFieldsId();
|
$aFormData['hidden_fields'] = $oFormManager->GetHiddenFieldsId();
|
||||||
// Check the number of editable fields
|
// Check the number of editable fields
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ EOF;
|
|||||||
}
|
}
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$oCtx = new ContextTag(ContextTag::TAG_SETUP);
|
||||||
|
|
||||||
$sCleanName = strtolower(trim(PHP_SAPI));
|
$sCleanName = strtolower(trim(PHP_SAPI));
|
||||||
if ($sCleanName !== 'cli')
|
if ($sCleanName !== 'cli')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user