Compare commits

...

7 Commits

Author SHA1 Message Date
Timothee
d0d4f11146 N°7662 Allowing indentation and de-indentation 2025-01-21 11:07:10 +01:00
jf-cbd
5ce1788d4a N°7776 remove twig from ajax calls, 3.2 edition 2025-01-20 16:34:46 +01:00
jf-cbd
38fe31c9fc Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/src/Controller/UserProfileBrickController.php
#	datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php
2025-01-20 16:33:35 +01:00
jf-cbd
ec61b52238 N°7776 remove twig from ajax calls, 3.1 edition 2025-01-20 16:02:26 +01:00
jf-cbd
072596a53b Merge remote-tracking branch 'origin/support/2.7' into support/3.1
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php
2025-01-20 15:53:34 +01:00
jf-cbd
160bfd714b N°7776 remove twig from ajax calls 2025-01-20 15:41:22 +01:00
Eric Espie
3b51124f1c N°7927 - No context tag available on designer MTP 2025-01-17 10:06:20 +01:00
10 changed files with 473 additions and 506 deletions

View File

@@ -354,6 +354,8 @@ class HTMLDOMSanitizer extends DOMSanitizer
'font-style',
'height',
'margin',
'margin-left',
'margin-right',
'padding',
'text-align',
'vertical-align',

View File

@@ -152,7 +152,7 @@ class UserProfileBrickController extends BrickController
// Preparing forms
$aData['forms']['contact'] = $this->ObjectFormHandlerHelper->HandleForm($oRequest, $sFormMode, $sCurContactClass,
$sCurContactId,
$oBrick->GetForm());
);
$aData['forms']['preferences'] = $this->HandlePreferencesForm($oRequest, $sFormMode);
// - If user can change password, we display the form
$aData['forms']['password'] = (UserRights::CanChangePassword()) ? $this->HandlePasswordForm($oRequest, $sFormMode) : null;
@@ -428,7 +428,7 @@ class UserProfileBrickController extends BrickController
'sObjectField' => $sPictureAttCode,
'cache' => 86400,
's' => $oOrmDoc->GetSignature(),
]);
]);
$aFormData['validation'] = array(
'valid' => true,
'messages' => array(),

View File

@@ -124,17 +124,15 @@ class ObjectFormHandlerHelper
* @throws \OQLException
* @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();
$sOperation = $this->oRequestManipulator->ReadParam('operation', '');
$bModal = ($oRequest->isXmlHttpRequest() && empty($sOperation));
// - Retrieve form properties
if ($aFormProperties === null)
{
$aFormProperties = ApplicationHelper::GetLoadedFormFromClass($this->aCombodoPortalInstanceConf['forms'], $sObjectClass, $sMode);
}
$aFormProperties = $aFormProperties ?? ApplicationHelper::GetLoadedFormFromClass($this->aCombodoPortalInstanceConf['forms'], $sObjectClass, $sMode);
// - Create and
if (empty($sOperation))
{
@@ -281,7 +279,8 @@ class ObjectFormHandlerHelper
->SetActionRulesToken($sActionRulesToken)
->SetRenderer($oFormRenderer)
->SetFormProperties($aFormProperties);
$oFormManager->PrepareFormAndHTMLDocument();
$oFormManager->PrepareFields();
$oFormManager->Build();
$aFormData['hidden_fields'] = $oFormManager->GetHiddenFieldsId();
// Check the number of editable fields

2
node_modules/.package-lock.json generated vendored
View File

@@ -71,7 +71,7 @@
},
"node_modules/ckeditor5-itop-build": {
"version": "3.2.0",
"resolved": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#7dcf9fc9b0010e121f1d8a4d28eca0219fcb6e35",
"resolved": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#deab849bf05e66948c5e66a57079ad1baea66b94",
"license": "SEE LICENSE IN LICENSE.md"
},
"node_modules/clipboard": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
package-lock.json generated
View File

@@ -104,7 +104,7 @@
},
"node_modules/ckeditor5-itop-build": {
"version": "3.2.0",
"resolved": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#7dcf9fc9b0010e121f1d8a4d28eca0219fcb6e35",
"resolved": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#deab849bf05e66948c5e66a57079ad1baea66b94",
"license": "SEE LICENSE IN LICENSE.md"
},
"node_modules/clipboard": {
@@ -357,8 +357,8 @@
}
},
"ckeditor5-itop-build": {
"version": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#7dcf9fc9b0010e121f1d8a4d28eca0219fcb6e35",
"from": "ckeditor5-itop-build@https://github.com/Combodo/ckeditor5-itop-build.git"
"version": "git+ssh://git@github.com/Combodo/ckeditor5-itop-build.git#deab849bf05e66948c5e66a57079ad1baea66b94",
"from": "ckeditor5-itop-build@github:Combodo/ckeditor5-itop-build"
},
"clipboard": {
"version": "2.0.11",

View File

@@ -26,6 +26,8 @@ EOF;
}
/////////////////////////////////////////////////
$oCtx = new ContextTag(ContextTag::TAG_SETUP);
$sCleanName = strtolower(trim(PHP_SAPI));
if ($sCleanName !== 'cli')
{