diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 524b37fb0..ccfec0d3d 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -9,6 +9,7 @@ use Combodo\iTop\Application\UI\Links\Set\BlockLinkSetDisplayAsProperty; use Combodo\iTop\Form\Field\LabelField; use Combodo\iTop\Form\Field\TextAreaField; use Combodo\iTop\Form\Form; +use Combodo\iTop\Form\Validator\LinkedSetValidator; use Combodo\iTop\Form\Validator\NotEmptyExtKeyValidator; use Combodo\iTop\Form\Validator\Validator; use Combodo\iTop\Renderer\BlockRenderer; @@ -2446,6 +2447,8 @@ class AttributeLinkedSet extends AttributeDefinition $oFormField->SetLnkAttributesToDisplay($aLnkAttributesToDisplay); } + $oFormField->AddValidator(new LinkedSetValidator()); + parent::MakeFormField($oObject, $oFormField); return $oFormField; diff --git a/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml b/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml index 81d4592b5..ba325cc9d 100644 --- a/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml +++ b/datamodels/2.x/itop-portal-base/portal/config/routes/object_brick.yaml @@ -75,6 +75,11 @@ p_object_get_information_json: defaults: _controller: 'Combodo\iTop\Portal\Controller\ObjectController::GetInformationAsJsonAction' +p_object_get_information_for_linked_set_json: + path: '/object/get-information-for-linked-set/json' + defaults: + _controller: 'Combodo\iTop\Portal\Controller\ObjectController::GetInformationForLinkedSetAsJsonAction' + p_object_document_display: path: '/object/document/display/{sObjectClass}/{sObjectId}/{sObjectField}' defaults: diff --git a/datamodels/2.x/itop-portal-base/portal/public/js/portal_form_handler.js b/datamodels/2.x/itop-portal-base/portal/public/js/portal_form_handler.js index 9ab20f5b9..bd88971ee 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/js/portal_form_handler.js +++ b/datamodels/2.x/itop-portal-base/portal/public/js/portal_form_handler.js @@ -103,12 +103,6 @@ $(function() oEvent.preventDefault(); var me = this; - // Prevent form submit if input in invalid state - // @see Bug N°803 - Allow display & edition of attributes on n:n relations on Portal - if($('input:invalid', this.element).length > 0){ - return; - } - // EasterEgg : Vibrate on submit if(window.navigator.vibrate) { diff --git a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php index cd145b809..af77d33af 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php @@ -26,6 +26,7 @@ use AttributeFinalClass; use AttributeFriendlyName; use AttributeImage; use BinaryExpression; +use Combodo\iTop\Form\Field\DateTimeField; use Combodo\iTop\Portal\Brick\CreateBrick; use Combodo\iTop\Portal\Helper\ApplicationHelper; use Combodo\iTop\Portal\Helper\ContextManipulatorHelper; @@ -1313,6 +1314,64 @@ class ObjectController extends BrickController /** @var \Combodo\iTop\Portal\Helper\ScopeValidatorHelper $oScopeValidator */ $oScopeValidator = $this->get('scope_validator'); + $aData = array(); + + // Retrieving parameters + $sObjectClass = $oRequestManipulator->ReadParam('sObjectClass', ''); + $aObjectIds = $oRequestManipulator->ReadParam('aObjectIds', array(), FILTER_UNSAFE_RAW); + $aObjectAttCodes = $oRequestManipulator->ReadParam('aObjectAttCodes', array(), FILTER_UNSAFE_RAW); + if (empty($sObjectClass) || empty($aObjectIds) || empty($aObjectAttCodes)) { + IssueLog::Info(__METHOD__.' at line '.__LINE__.' : sObjectClass, aObjectIds and aObjectAttCodes expected, "'.$sObjectClass.'", "'.implode('/', + $aObjectIds).'" given.'); + throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, 'Invalid request data, some information are missing'); + } + + // Building the search + $bIgnoreSilos = $oScopeValidator->IsAllDataAllowedForScope(UserRights::ListProfiles(), $sObjectClass); + $aParams = array('objects_id' => $aObjectIds); + $oSearch = DBObjectSearch::FromOQL("SELECT $sObjectClass WHERE id IN (:objects_id)"); + if ($bIgnoreSilos === true) { + $oSearch->AllowAllData(); + } + $oSet = new DBObjectSet($oSearch, array(), $aParams); + $oSet->OptimizeColumnLoad(array($oSearch->GetClassAlias() => $aObjectAttCodes)); + + // Checking that id is in the AttCodes + // Note: We do that AFTER the array is used in OptimizeColumnLoad() because the function doesn't support this anymore. + if (!in_array('id', $aObjectAttCodes)) { + $aObjectAttCodes = array_merge(array('id'), $aObjectAttCodes); + } + + // Retrieving objects + while ($oObject = $oSet->Fetch()) { + $aData['items'][] = $this->PrepareObjectInformation($oObject, $aObjectAttCodes); + } + + return new JsonResponse($aData); + } + + /** + * GetInformationAsJsonAction for linked set usages. + * + * @param \Symfony\Component\HttpFoundation\Request $oRequest + * + * @return \Symfony\Component\HttpFoundation\JsonResponse + * + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \MySQLException + * @throws \OQLException + * @throws \Exception + * @since 3.1 + * + */ + public function GetInformationForLinkedSetAsJsonAction(Request $oRequest) + { + /** @var \Combodo\iTop\Portal\Helper\RequestManipulatorHelper $oRequestManipulator */ + $oRequestManipulator = $this->get('request_manipulator'); + /** @var \Combodo\iTop\Portal\Helper\ScopeValidatorHelper $oScopeValidator */ + $oScopeValidator = $this->get('scope_validator'); + // Data array $aData = array( 'js_inline' => '', @@ -1325,6 +1384,7 @@ class ObjectController extends BrickController $aObjectIds = $oRequestManipulator->ReadParam('aObjectIds', array(), FILTER_UNSAFE_RAW); $aObjectAttCodes = $oRequestManipulator->ReadParam('aObjectAttCodes', array(), FILTER_UNSAFE_RAW); $aLinkAttCodes = $oRequestManipulator->ReadParam('aLinkAttCodes', array(), FILTER_UNSAFE_RAW); + $sDateTimePickerWidgetParent = $oRequestManipulator->ReadParam('sDateTimePickerWidgetParent', array(), FILTER_SANITIZE_STRING); if (empty($sObjectClass) || empty($aObjectIds) || empty($aObjectAttCodes)) { IssueLog::Info(__METHOD__.' at line '.__LINE__.' : sObjectClass, aObjectIds and aObjectAttCodes expected, "'.$sObjectClass.'", "'.implode('/', @@ -1358,6 +1418,10 @@ class ObjectController extends BrickController foreach ($aLinkAttCodes as $sAttCode) { $oAttDef = MetaModel::GetAttributeDef($sLinkClass, $sAttCode); $oField = $oAttDef->MakeFormField($oNewLink); + // Prevent datetimepicker popup to be truncated + if ($oField instanceof DateTimeField) { + $oField->SetDateTimePickerWidgetParent($sDateTimePickerWidgetParent); + } $sFieldRendererClass = BsLinkedSetFieldRenderer::GetFieldRendererClass($oField); $sValue = $oAttDef->GetAsHTML($oNewLink->Get($sAttCode)); if ($sFieldRendererClass !== null) { diff --git a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php index 72e4997bb..a063b2b8b 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php @@ -751,7 +751,7 @@ class ObjectFormManager extends FormManager if (in_array(get_class($oField), array('Combodo\\iTop\\Form\\Field\\LinkedSetField'))) { /** @var \Combodo\iTop\Form\Field\LinkedSetField $oField */ if ($this->oFormHandlerHelper !== null) { - $oField->SetInformationEndpoint($this->oFormHandlerHelper->GetUrlGenerator()->generate('p_object_get_information_json')); + $oField->SetInformationEndpoint($this->oFormHandlerHelper->GetUrlGenerator()->generate('p_object_get_information_for_linked_set_json')); } } // - Field that require to apply scope on its DM OQL diff --git a/js/form_field.js b/js/form_field.js index 712b775db..97d1707f7 100644 --- a/js/form_field.js +++ b/js/form_field.js @@ -186,6 +186,24 @@ $(function() } } } + else if(sValidatorType === 'LinkedSetValidator'){ + // Prevent form submit if inputs are invalid state + // @see Bug N°803 - Allow display & edition of attributes on n:n relations on Portal + oResult.error_messages.push(oValidator.message); + const aLinkedSetInvalidInputs = $('input:invalid', this.element); + if(aLinkedSetInvalidInputs.length > 0){ + aLinkedSetInvalidInputs.each(function(e){ + const $Input = $(this); + const aInputValidity = $Input[0].validity; + if(aInputValidity.valueMissing){ + oResult.is_valid = false; + } + if(aInputValidity.patternMismatch){ + oResult.is_valid = false; + } + }); + } + } else { var oRegExp = new RegExp(oValidator.reg_exp, "g"); diff --git a/lib/autoload.php b/lib/autoload.php index f1eeef5ab..460e67535 100644 --- a/lib/autoload.php +++ b/lib/autoload.php @@ -2,11 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - exit(1); -} - require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit7f81b4a2a468a061c306af5e447a9a9f::getLoader(); diff --git a/lib/composer/ClassLoader.php b/lib/composer/ClassLoader.php index afef3fa2a..0cd6055d1 100644 --- a/lib/composer/ClassLoader.php +++ b/lib/composer/ClassLoader.php @@ -149,7 +149,7 @@ class ClassLoader /** * @return string[] Array of classname => path - * @psalm-return array + * @psalm-var array */ public function getClassMap() { diff --git a/lib/composer/InstalledVersions.php b/lib/composer/InstalledVersions.php index c6b54af7b..d50e0c9fc 100644 --- a/lib/composer/InstalledVersions.php +++ b/lib/composer/InstalledVersions.php @@ -21,14 +21,12 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final */ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null */ private static $installed; @@ -39,7 +37,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -243,7 +241,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -257,7 +255,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -280,7 +278,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -303,7 +301,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -313,7 +311,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index a7f82e11e..79f445f92 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( @@ -416,6 +416,7 @@ return array( 'Combodo\\iTop\\Form\\Form' => $baseDir . '/sources/Form/Form.php', 'Combodo\\iTop\\Form\\FormManager' => $baseDir . '/sources/Form/FormManager.php', 'Combodo\\iTop\\Form\\Validator\\IntegerValidator' => $baseDir . '/sources/Form/Validator/IntegerValidator.php', + 'Combodo\\iTop\\Form\\Validator\\LinkedSetValidator' => $baseDir . '/sources/Form/Validator/LinkedSetValidator.php', 'Combodo\\iTop\\Form\\Validator\\MandatoryValidator' => $baseDir . '/sources/Form/Validator/MandatoryValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\Validator' => $baseDir . '/sources/Form/Validator/Validator.php', diff --git a/lib/composer/autoload_files.php b/lib/composer/autoload_files.php index 50c5aa314..2dfdef1d3 100644 --- a/lib/composer/autoload_files.php +++ b/lib/composer/autoload_files.php @@ -2,23 +2,23 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', + '23c18046f52bef3eea034657bafda50f' => $vendorDir . '/symfony/polyfill-php81/bootstrap.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => $vendorDir . '/laminas/laminas-servicemanager/src/autoload.php', + '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php', + 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php', ); diff --git a/lib/composer/autoload_namespaces.php b/lib/composer/autoload_namespaces.php index 6629b7e09..1db5bf646 100644 --- a/lib/composer/autoload_namespaces.php +++ b/lib/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_psr4.php b/lib/composer/autoload_psr4.php index 3b30be01d..eb2c95ace 100644 --- a/lib/composer/autoload_psr4.php +++ b/lib/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/autoload_real.php b/lib/composer/autoload_real.php index dda4f956d..cc554d8d1 100644 --- a/lib/composer/autoload_real.php +++ b/lib/composer/autoload_real.php @@ -25,20 +25,33 @@ class ComposerAutoloaderInit7f81b4a2a468a061c306af5e447a9a9f require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit7f81b4a2a468a061c306af5e447a9a9f', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInit7f81b4a2a468a061c306af5e447a9a9f', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); set_include_path(implode(PATH_SEPARATOR, $includePaths)); - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::getInitializer($loader)); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::getInitializer($loader)); + } else { + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$files; + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } foreach ($includeFiles as $fileIdentifier => $file) { composerRequire7f81b4a2a468a061c306af5e447a9a9f($fileIdentifier, $file); } @@ -47,16 +60,11 @@ class ComposerAutoloaderInit7f81b4a2a468a061c306af5e447a9a9f } } -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ function composerRequire7f81b4a2a468a061c306af5e447a9a9f($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; } } diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index c91615e1d..f6c6e6728 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -7,21 +7,21 @@ namespace Composer\Autoload; class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f { public static $files = array ( - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', - '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', + '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', - '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', - '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'c9d07b32a2e02bc0fc582d4f0c1b56cc' => __DIR__ . '/..' . '/laminas/laminas-servicemanager/src/autoload.php', + '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', + 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', - 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', ); public static $prefixLengthsPsr4 = array ( @@ -780,6 +780,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f 'Combodo\\iTop\\Form\\Form' => __DIR__ . '/../..' . '/sources/Form/Form.php', 'Combodo\\iTop\\Form\\FormManager' => __DIR__ . '/../..' . '/sources/Form/FormManager.php', 'Combodo\\iTop\\Form\\Validator\\IntegerValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/IntegerValidator.php', + 'Combodo\\iTop\\Form\\Validator\\LinkedSetValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/LinkedSetValidator.php', 'Combodo\\iTop\\Form\\Validator\\MandatoryValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/MandatoryValidator.php', 'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php', 'Combodo\\iTop\\Form\\Validator\\Validator' => __DIR__ . '/../..' . '/sources/Form/Validator/Validator.php', diff --git a/lib/composer/include_paths.php b/lib/composer/include_paths.php index af33c1491..d4fb96718 100644 --- a/lib/composer/include_paths.php +++ b/lib/composer/include_paths.php @@ -2,7 +2,7 @@ // include_paths.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/lib/composer/installed.php b/lib/composer/installed.php index a55727a5d..a69f6ff0d 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -1,40 +1,40 @@ array( - 'name' => 'combodo/itop', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '68a1c0f0cb5742f05a3a95ae016750208a933612', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '1b7529fcb988f27abcc14834836b047e765323bd', + 'name' => 'combodo/itop', 'dev' => true, ), 'versions' => array( 'apereo/phpcas' => array( 'pretty_version' => '1.6.0', 'version' => '1.6.0.0', - 'reference' => 'f817c72a961484afef95ac64a9257c8e31f063b9', 'type' => 'library', 'install_path' => __DIR__ . '/../apereo/phpcas', 'aliases' => array(), + 'reference' => 'f817c72a961484afef95ac64a9257c8e31f063b9', 'dev_requirement' => false, ), 'combodo/itop' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '68a1c0f0cb5742f05a3a95ae016750208a933612', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), + 'reference' => '1b7529fcb988f27abcc14834836b047e765323bd', 'dev_requirement' => false, ), 'combodo/tcpdf' => array( 'pretty_version' => '6.4.4', 'version' => '6.4.4.0', - 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8', 'type' => 'library', 'install_path' => __DIR__ . '/../combodo/tcpdf', 'aliases' => array(), + 'reference' => '0e31c013ccd000aa6762e9186778aa6e259ac8e8', 'dev_requirement' => false, ), 'container-interop/container-interop' => array( @@ -46,181 +46,181 @@ 'firebase/php-jwt' => array( 'pretty_version' => 'v6.4.0', 'version' => '6.4.0.0', - 'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), + 'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224', 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( 'pretty_version' => '7.7.0', 'version' => '7.7.0.0', - 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), + 'reference' => 'fb7566caccf22d74d1ab270de3551f72a58399f5', 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( 'pretty_version' => '2.0.0', 'version' => '2.0.0.0', - 'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), + 'reference' => '3a494dc7dc1d7d12e511890177ae2d0e6c107da6', 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( 'pretty_version' => '2.5.0', 'version' => '2.5.0.0', - 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), + 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6', 'dev_requirement' => false, ), 'laminas/laminas-loader' => array( 'pretty_version' => '2.8.0', 'version' => '2.8.0.0', - 'reference' => 'd0589ec9dd48365fd95ad10d1c906efd7711c16b', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-loader', 'aliases' => array(), + 'reference' => 'd0589ec9dd48365fd95ad10d1c906efd7711c16b', 'dev_requirement' => false, ), 'laminas/laminas-mail' => array( 'pretty_version' => '2.16.0', 'version' => '2.16.0.0', - 'reference' => '1ee1a384b96c8af29ecad9b3a7adc27a150ebc49', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-mail', 'aliases' => array(), + 'reference' => '1ee1a384b96c8af29ecad9b3a7adc27a150ebc49', 'dev_requirement' => false, ), 'laminas/laminas-mime' => array( 'pretty_version' => '2.9.1', 'version' => '2.9.1.0', - 'reference' => '72d21a1b4bb7086d4a4d7058c0abca180b209184', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-mime', 'aliases' => array(), + 'reference' => '72d21a1b4bb7086d4a4d7058c0abca180b209184', 'dev_requirement' => false, ), 'laminas/laminas-servicemanager' => array( 'pretty_version' => '3.16.0', 'version' => '3.16.0.0', - 'reference' => '863c66733740cd36ebf5e700f4258ef2c68a2a24', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-servicemanager', 'aliases' => array(), + 'reference' => '863c66733740cd36ebf5e700f4258ef2c68a2a24', 'dev_requirement' => false, ), 'laminas/laminas-stdlib' => array( 'pretty_version' => '3.12.0', 'version' => '3.12.0.0', - 'reference' => 'c5aed3c798018e31fbb7b1e421b8d96bf2cda453', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-stdlib', 'aliases' => array(), + 'reference' => 'c5aed3c798018e31fbb7b1e421b8d96bf2cda453', 'dev_requirement' => false, ), 'laminas/laminas-validator' => array( 'pretty_version' => '2.23.0', 'version' => '2.23.0.0', - 'reference' => '6d61b6cc3b222f13807a18d9247cdfb084958b03', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-validator', 'aliases' => array(), + 'reference' => '6d61b6cc3b222f13807a18d9247cdfb084958b03', 'dev_requirement' => false, ), 'league/oauth2-client' => array( 'pretty_version' => '2.6.1', 'version' => '2.6.1.0', - 'reference' => '2334c249907190c132364f5dae0287ab8666aa19', 'type' => 'library', 'install_path' => __DIR__ . '/../league/oauth2-client', 'aliases' => array(), + 'reference' => '2334c249907190c132364f5dae0287ab8666aa19', 'dev_requirement' => false, ), 'league/oauth2-google' => array( 'pretty_version' => '3.0.4', 'version' => '3.0.4.0', - 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', 'type' => 'library', 'install_path' => __DIR__ . '/../league/oauth2-google', 'aliases' => array(), + 'reference' => '6b79441f244040760bed5fdcd092a2bda7cf34c6', 'dev_requirement' => false, ), 'nikic/php-parser' => array( 'pretty_version' => 'v4.14.0', 'version' => '4.14.0.0', - 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), + 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', 'dev_requirement' => false, ), 'paragonie/random_compat' => array( 'pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', - 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), + 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'dev_requirement' => false, ), 'pear/archive_tar' => array( 'pretty_version' => '1.4.14', 'version' => '1.4.14.0', - 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/archive_tar', 'aliases' => array(), + 'reference' => '4d761c5334c790e45ef3245f0864b8955c562caa', 'dev_requirement' => false, ), 'pear/console_getopt' => array( 'pretty_version' => 'v1.4.3', 'version' => '1.4.3.0', - 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/console_getopt', 'aliases' => array(), + 'reference' => 'a41f8d3e668987609178c7c4a9fe48fecac53fa0', 'dev_requirement' => false, ), 'pear/pear-core-minimal' => array( 'pretty_version' => 'v1.10.11', 'version' => '1.10.11.0', - 'reference' => '68d0d32ada737153b7e93b8d3c710ebe70ac867d', 'type' => 'library', 'install_path' => __DIR__ . '/../pear/pear-core-minimal', 'aliases' => array(), + 'reference' => '68d0d32ada737153b7e93b8d3c710ebe70ac867d', 'dev_requirement' => false, ), 'pear/pear_exception' => array( 'pretty_version' => 'v1.0.2', 'version' => '1.0.2.0', - 'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0', 'type' => 'class', 'install_path' => __DIR__ . '/../pear/pear_exception', 'aliases' => array(), + 'reference' => 'b14fbe2ddb0b9f94f5b24cf08783d599f776fff0', 'dev_requirement' => false, ), 'pelago/emogrifier' => array( 'pretty_version' => 'v6.0.0', 'version' => '6.0.0.0', - 'reference' => 'aa72d5407efac118f3896bcb995a2cba793df0ae', 'type' => 'library', 'install_path' => __DIR__ . '/../pelago/emogrifier', 'aliases' => array(), + 'reference' => 'aa72d5407efac118f3896bcb995a2cba793df0ae', 'dev_requirement' => false, ), 'psr/cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', - 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), + 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'dev_requirement' => false, ), 'psr/cache-implementation' => array( @@ -232,10 +232,10 @@ 'psr/container' => array( 'pretty_version' => '1.1.2', 'version' => '1.1.2.0', - 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), + 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'dev_requirement' => false, ), 'psr/container-implementation' => array( @@ -248,10 +248,10 @@ 'psr/event-dispatcher' => array( 'pretty_version' => '1.0.0', 'version' => '1.0.0.0', - 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), + 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'dev_requirement' => false, ), 'psr/event-dispatcher-implementation' => array( @@ -263,10 +263,10 @@ 'psr/http-client' => array( 'pretty_version' => '1.0.2', 'version' => '1.0.2.0', - 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), + 'reference' => '0955afe48220520692d2d09f7ab7e0f93ffd6a31', 'dev_requirement' => false, ), 'psr/http-client-implementation' => array( @@ -278,10 +278,10 @@ 'psr/http-factory' => array( 'pretty_version' => '1.0.2', 'version' => '1.0.2.0', - 'reference' => 'e616d01114759c4c489f93b099585439f795fe35', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), + 'reference' => 'e616d01114759c4c489f93b099585439f795fe35', 'dev_requirement' => false, ), 'psr/http-factory-implementation' => array( @@ -293,10 +293,10 @@ 'psr/http-message' => array( 'pretty_version' => '2.0', 'version' => '2.0.0.0', - 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), + 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'dev_requirement' => false, ), 'psr/http-message-implementation' => array( @@ -308,10 +308,10 @@ 'psr/log' => array( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), + 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'dev_requirement' => false, ), 'psr/log-implementation' => array( @@ -329,10 +329,10 @@ 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), + 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'dev_requirement' => false, ), 'rsky/pear-core-min' => array( @@ -344,37 +344,37 @@ 'sabberworm/php-css-parser' => array( 'pretty_version' => '8.4.0', 'version' => '8.4.0.0', - 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), + 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'dev_requirement' => false, ), 'scssphp/scssphp' => array( 'pretty_version' => 'v1.10.5', 'version' => '1.10.5.0', - 'reference' => '6d44282ccf283e133ab70b6282f8e068ff2f9bf9', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), + 'reference' => '6d44282ccf283e133ab70b6282f8e068ff2f9bf9', 'dev_requirement' => false, ), 'symfony/cache' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '5a0fff46df349f0db3fe242263451fddf5277362', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache', 'aliases' => array(), + 'reference' => '5a0fff46df349f0db3fe242263451fddf5277362', 'dev_requirement' => false, ), 'symfony/cache-contracts' => array( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', - 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache-contracts', 'aliases' => array(), + 'reference' => '64be4a7acb83b6f2bf6de9a02cee6dad41277ebc', 'dev_requirement' => false, ), 'symfony/cache-implementation' => array( @@ -386,82 +386,82 @@ 'symfony/config' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => 'ec79e03125c1d2477e43dde8528535d90cc78379', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), + 'reference' => 'ec79e03125c1d2477e43dde8528535d90cc78379', 'dev_requirement' => false, ), 'symfony/console' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => 'dccb8d251a9017d5994c988b034d3e18aaabf740', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), + 'reference' => 'dccb8d251a9017d5994c988b034d3e18aaabf740', 'dev_requirement' => false, ), 'symfony/css-selector' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => 'c1681789f059ab756001052164726ae88512ae3d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), + 'reference' => 'c1681789f059ab756001052164726ae88512ae3d', 'dev_requirement' => false, ), 'symfony/dependency-injection' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => 'a8b9251016e9476db73e25fa836904bc0bf74c62', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), + 'reference' => 'a8b9251016e9476db73e25fa836904bc0bf74c62', 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', - 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), + 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'dev_requirement' => false, ), 'symfony/dotenv' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => '38190ba62566afa26ca723a795d0a004e061bd2a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dotenv', 'aliases' => array(), + 'reference' => '38190ba62566afa26ca723a795d0a004e061bd2a', 'dev_requirement' => false, ), 'symfony/error-handler' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => 'f75d17cb4769eb38cd5fccbda95cd80a054d35c8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/error-handler', 'aliases' => array(), + 'reference' => 'f75d17cb4769eb38cd5fccbda95cd80a054d35c8', 'dev_requirement' => false, ), 'symfony/event-dispatcher' => array( 'pretty_version' => 'v5.4.9', 'version' => '5.4.9.0', - 'reference' => '8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), + 'reference' => '8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc', 'dev_requirement' => false, ), 'symfony/event-dispatcher-contracts' => array( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', - 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher-contracts', 'aliases' => array(), + 'reference' => 'f98b54df6ad059855739db6fcbc2d36995283fe1', 'dev_requirement' => false, ), 'symfony/event-dispatcher-implementation' => array( @@ -473,145 +473,145 @@ 'symfony/filesystem' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '6699fb0228d1bc35b12aed6dd5e7455457609ddd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), + 'reference' => '6699fb0228d1bc35b12aed6dd5e7455457609ddd', 'dev_requirement' => false, ), 'symfony/finder' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '7872a66f57caffa2916a584db1aa7f12adc76f8c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), + 'reference' => '7872a66f57caffa2916a584db1aa7f12adc76f8c', 'dev_requirement' => false, ), 'symfony/framework-bundle' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => 'a208ee578000f9dedcb50a9784ec7ff8706a7bf1', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/framework-bundle', 'aliases' => array(), + 'reference' => 'a208ee578000f9dedcb50a9784ec7ff8706a7bf1', 'dev_requirement' => false, ), 'symfony/http-foundation' => array( 'pretty_version' => 'v5.4.20', 'version' => '5.4.20.0', - 'reference' => 'd0435363362a47c14e9cf50663cb8ffbf491875a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), + 'reference' => 'd0435363362a47c14e9cf50663cb8ffbf491875a', 'dev_requirement' => false, ), 'symfony/http-kernel' => array( 'pretty_version' => 'v5.4.20', 'version' => '5.4.20.0', - 'reference' => 'aaeec341582d3c160cc9ecfa8b2419ba6c69954e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), + 'reference' => 'aaeec341582d3c160cc9ecfa8b2419ba6c69954e', 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), + 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', 'dev_requirement' => false, ), 'symfony/polyfill-intl-grapheme' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '433d05519ce6990bf3530fba6957499d327395c2', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme', 'aliases' => array(), + 'reference' => '433d05519ce6990bf3530fba6957499d327395c2', 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), + 'reference' => '59a8d271f00dd0e4c2e518104cc7963f655a1aa8', 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), + 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), + 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), + 'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2', 'dev_requirement' => false, ), 'symfony/polyfill-php73' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), + 'reference' => 'e440d35fa0286f77fb45b79a03fedbeda9307e85', 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), + 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'dev_requirement' => false, ), 'symfony/polyfill-php81' => array( 'pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', - 'reference' => '13f6d1271c663dc5ae9fb843a8f16521db7687a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), + 'reference' => '13f6d1271c663dc5ae9fb843a8f16521db7687a1', 'dev_requirement' => false, ), 'symfony/routing' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '3e01ccd9b2a3a4167ba2b3c53612762300300226', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/routing', 'aliases' => array(), + 'reference' => '3e01ccd9b2a3a4167ba2b3c53612762300300226', 'dev_requirement' => false, ), 'symfony/service-contracts' => array( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', - 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), + 'reference' => '4b426aac47d6427cc1a1d0f7e2ac724627f5966c', 'dev_requirement' => false, ), 'symfony/service-implementation' => array( @@ -623,82 +623,82 @@ 'symfony/stopwatch' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => 'bd2b066090fd6a67039371098fa25a84cb2679ec', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/stopwatch', 'aliases' => array(), + 'reference' => 'bd2b066090fd6a67039371098fa25a84cb2679ec', 'dev_requirement' => true, ), 'symfony/string' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '5eb661e49ad389e4ae2b6e4df8d783a8a6548322', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), + 'reference' => '5eb661e49ad389e4ae2b6e4df8d783a8a6548322', 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( 'pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', - 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), + 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'dev_requirement' => false, ), 'symfony/twig-bridge' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => '63b8a50d48c9fe3d04e77307d4f1771dd848baa8', 'type' => 'symfony-bridge', 'install_path' => __DIR__ . '/../symfony/twig-bridge', 'aliases' => array(), + 'reference' => '63b8a50d48c9fe3d04e77307d4f1771dd848baa8', 'dev_requirement' => false, ), 'symfony/twig-bundle' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => '286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/twig-bundle', 'aliases' => array(), + 'reference' => '286bd9e38b9bcb142f1eda0a75b0bbeb49ff34bd', 'dev_requirement' => false, ), 'symfony/var-dumper' => array( 'pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', - 'reference' => 'b8f306d7b8ef34fb3db3305be97ba8e088fb4861', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), + 'reference' => 'b8f306d7b8ef34fb3db3305be97ba8e088fb4861', 'dev_requirement' => false, ), 'symfony/var-exporter' => array( 'pretty_version' => 'v5.4.10', 'version' => '5.4.10.0', - 'reference' => '8fc03ee75eeece3d9be1ef47d26d79bea1afb340', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), + 'reference' => '8fc03ee75eeece3d9be1ef47d26d79bea1afb340', 'dev_requirement' => false, ), 'symfony/web-profiler-bundle' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => 'cd83822071f2bc05583af1e53c1bc46be625a56d', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/web-profiler-bundle', 'aliases' => array(), + 'reference' => 'cd83822071f2bc05583af1e53c1bc46be625a56d', 'dev_requirement' => true, ), 'symfony/yaml' => array( 'pretty_version' => 'v5.4.19', 'version' => '5.4.19.0', - 'reference' => '71c05db20cb9b54d381a28255f17580e2b7e36a5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), + 'reference' => '71c05db20cb9b54d381a28255f17580e2b7e36a5', 'dev_requirement' => false, ), 'tecnickcom/tcpdf' => array( @@ -710,28 +710,28 @@ 'thenetworg/oauth2-azure' => array( 'pretty_version' => 'v2.1.1', 'version' => '2.1.1.0', - 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', 'type' => 'library', 'install_path' => __DIR__ . '/../thenetworg/oauth2-azure', 'aliases' => array(), + 'reference' => '06fb2d620fb6e6c934f632c7ec7c5ea2e978a844', 'dev_requirement' => false, ), 'twig/twig' => array( 'pretty_version' => 'v3.4.3', 'version' => '3.4.3.0', - 'reference' => 'c38fd6b0b7f370c198db91ffd02e23b517426b58', 'type' => 'library', 'install_path' => __DIR__ . '/../twig/twig', 'aliases' => array(), + 'reference' => 'c38fd6b0b7f370c198db91ffd02e23b517426b58', 'dev_requirement' => false, ), 'webmozart/assert' => array( 'pretty_version' => '1.11.0', 'version' => '1.11.0.0', - 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), + 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'dev_requirement' => false, ), ), diff --git a/sources/Form/Field/DateTimeField.php b/sources/Form/Field/DateTimeField.php index 775484bb3..88dfb4562 100644 --- a/sources/Form/Field/DateTimeField.php +++ b/sources/Form/Field/DateTimeField.php @@ -32,6 +32,8 @@ class DateTimeField extends StringField protected $sPHPDateTimeFormat; /** @var bool */ protected $bDateOnly; + /** @var string|null $sDateTimePickerWidgetParent @since 3.1 */ + private ?string $sDateTimePickerWidgetParent = null; /** * @inheritDoc @@ -107,4 +109,34 @@ class DateTimeField extends StringField return $this->bDateOnly; } + + /** + * Allow date time picker widget popup to be positioned relative to a specific dom element. + * + * @see N°803 - Allow display & edition of attributes on n:n relations on Portal + * LinkedSetFieldRenderer allow modification of link attributes, the default widget positioning truncates the popup. + * + * @param string $sParent + * + * @return void + * @since 3.1 + * + */ + public function SetDateTimePickerWidgetParent(string $sParent): DateTimeField + { + $this->sDateTimePickerWidgetParent = $sParent; + + return $this; + } + + /** + * + * @return string|null + * @since 3.1 + * + */ + public function GetDateTimePickerWidgetParent(): ?string + { + return $this->sDateTimePickerWidgetParent; + } } diff --git a/sources/Form/Validator/LinkedSetValidator.php b/sources/Form/Validator/LinkedSetValidator.php new file mode 100644 index 000000000..69f7c7e25 --- /dev/null +++ b/sources/Form/Validator/LinkedSetValidator.php @@ -0,0 +1,36 @@ + + +namespace Combodo\iTop\Form\Validator; + +/** + * Description of LinkedSetValidator + * + * @since 3.1 + */ +class LinkedSetValidator extends Validator +{ + const VALIDATOR_NAME = 'LinkedSetValidator'; + + /** @inheritdoc */ + public static function GetName() + { + return static::VALIDATOR_NAME; + } +} diff --git a/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php b/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php index 7491244b0..3b2dc859a 100644 --- a/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php +++ b/sources/Renderer/Bootstrap/FieldRenderer/BsLinkedSetFieldRenderer.php @@ -22,6 +22,7 @@ namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer; use ApplicationContext; use AttributeFriendlyName; +use Combodo\iTop\Form\Field\DateTimeField; use Combodo\iTop\Form\Field\Field; use Combodo\iTop\Renderer\Bootstrap\BsFieldRendererMappings; use Combodo\iTop\Renderer\FieldRenderer; @@ -311,6 +312,12 @@ EOF }); }); + // Prevent row selection on input click + $('input,select,textarea,.input-group-addon', oRow).on('click', function(oEvent){ + // Prevents row selection + oEvent.stopPropagation(); + }); + // Store attributes inline css and js for (var key in oData.attributes) { const aElement = oData.attributes[key]; @@ -394,14 +401,35 @@ JS ); // Additional features if in edition mode - if (!$this->oField->GetReadOnly()) - { - // Attaching JS widget - $sObjectInformationsUrl = $this->oField->GetInformationEndpoint(); - $oOutput->AddJs( - <<oField->GetReadOnly()) { + $aErrorMessagesMandatory = Dict::S('Core:Validator:Mandatory'); + $aErrorMessagesDefault = Dict::S('Core:Validator:Default'); + // Attaching JS widget + $sObjectInformationsUrl = $this->oField->GetInformationEndpoint(); + $oOutput->AddJs( + <<GetValidatorsAsJson()}, + 'on_validation_callback': function(){ + const aLinkedSetInputs = $('#{$sFieldWrapperId} input', this.element); + aLinkedSetInputs.each(function(e){ + const oInput = $(this); + const aInputValidity = oInput[0].validity; + const oFormField = oInput.closest('.form_field_control'); + if(aInputValidity.valueMissing){ + oFormField.toggleClass('has-error', true); + $('.help-block', oFormField).html('$aErrorMessagesMandatory'); + } + else if(aInputValidity.patternMismatch){ + oFormField.toggleClass('has-error', true); + $('.help-block', oFormField).html('$aErrorMessagesDefault'); + } + else{ + oFormField.toggleClass('has-error', false); + $('.help-block', oFormField).empty(); + } + }); + }, 'get_current_value_callback': function(me, oEvent, oData){ // Read linked set value as array @@ -459,6 +487,7 @@ JS aObjectIds: aObjectIds, aObjectAttCodes: $sAttCodesToDisplayAsJson, aLinkAttCodes: $sLnkAttCodesToDisplayAsJson, + sDateTimePickerWidgetParent: '#table_{$this->oField->GetGlobalId()}_wrapper' }, function(oData){ @@ -703,7 +732,7 @@ JS ); // Link attributes to display - $this->PrepareItem($oItem, $this->oField->GetLinkedClass(), $this->oField->GetLnkAttributesToDisplay(true), true, $aItemProperties, 'lnk__'); + $this->PrepareItem($oItem, $this->oField->GetLinkedClass(), $this->oField->GetLnkAttributesToDisplay(true), !$this->oField->GetReadOnly(), $aItemProperties, 'lnk__'); // Remote attributes to display $this->PrepareItem($oRemoteItem, $this->oField->GetTargetClass(), $this->oField->GetAttributesToDisplay(true), false, $aItemProperties); @@ -785,6 +814,11 @@ JS $oField = $oAttDef->MakeFormField($oItem); + // Prevent datetimepicker popup to be truncated + if ($oField instanceof DateTimeField) { + $oField->SetDateTimePickerWidgetParent('#table_'.$this->oField->GetGlobalId().'_wrapper'); + } + $sFieldRendererClass = static::GetFieldRendererClass($oField); if ($sFieldRendererClass !== null) { diff --git a/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php b/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php index 0a9dfaca9..dc7789cc6 100644 --- a/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php +++ b/sources/Renderer/Bootstrap/FieldRenderer/BsSimpleFieldRenderer.php @@ -88,6 +88,15 @@ class BsSimpleFieldRenderer extends BsFieldRenderer // - Value regarding the field type switch ($sFieldClass) { case 'Combodo\\iTop\\Form\\Field\\DateTimeField': + + /* @see N°803 - Allow display & edition of attributes on n:n relations on Portal + * LinkedSetFieldRenderer allow modification of link attributes, the default widget positioning truncates the popup. + */ + $sParent = ''; + if ($this->oField->GetDateTimePickerWidgetParent() != null) { + $sParent = ", widgetParent: '{$this->oField->GetDateTimePickerWidgetParent()}'"; + } + $oOutput->AddHtml('
'); $oOutput->AddHtml(''); $oOutput->AddHtml(''); @@ -96,7 +105,7 @@ class BsSimpleFieldRenderer extends BsFieldRenderer $sLocale = Dict::S('Portal:Calendar-FirstDayOfWeek'); $oOutput->AddJs( <<oField->GetGlobalId()}').datetimepicker({format: $sJSFormat, locale: '$sLocale'}); + $('#datepicker_{$this->oField->GetGlobalId()}').datetimepicker({format: $sJSFormat, locale: '$sLocale' $sParent}); EOF ); break;