Commit Graph

40 Commits

Author SHA1 Message Date
odain
b0a792afab N°8796 - Add PHP code style validation in iTop and extensions - format whole code base 2025-11-07 20:39:38 +01:00
odain
7681c157ec Merge branch 'support/3.2' into develop 2025-11-07 20:33:14 +01:00
odain
890a2568c8 N°8796 - Add PHP code style validation in iTop and extensions - format whole code base 2025-11-07 15:39:53 +01:00
Benjamin Dalsass
2b18ab9690 N°6491 - Remove \Combodo\iTop\Form\Validator\Validator class 2025-07-29 15:03:19 +02:00
Stephen Abello
738c7e1b8e N°6490 - Remove SelectObjectField::VerifyCurrentValue 2025-07-29 10:41:44 +02:00
Benjamin Dalsass
1d3c71fd10 N°7534 - Request to Improve the Display of an Inline Attachment (#664) 2024-08-19 11:03:06 +02:00
Romain Quetiez
baf85e7a80 N°7629 Deprecate utils::GetClassesForInterface in favor of InterfaceDiscovery::FindItopClasses
Improve caching strategy and robustness
2024-07-16 10:13:13 +02:00
Eric Espie
2804076bf6 N°7514 - hardening code
(cherry picked from commit b8b9423aa85c65b25f7fb3d9c5ba0933317474d7)
2024-06-18 17:40:20 +02:00
Eric Espie
6e364a0ab9 N°7514 - hardening code 2024-06-18 16:00:08 +02:00
Molkobain
ad36066126 📝 Copyright year bump 2024-05-06 18:35:31 +02:00
Molkobain
1235452a1b Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-19 09:24:21 +02:00
Molkobain
35f4ab4941 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-19 09:22:32 +02:00
Molkobain
4f3b25aa46 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-18 18:17:41 +02:00
Molkobain
f737bcb9a0 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-18 18:16:24 +02:00
Pierre Goiffon
e36b9eb664 N°6414 Make AbstractSimpleField::Validate final
We don't have any overrides remaining anymore
2023-07-03 11:30:04 +02:00
Pierre Goiffon
6cc2d49cd5 N°6414 Move existing AbstractSimpleField::Validate impl to custom validators
- LinkedSetField
- SelectObjectField
- MultipleChoicesField (warning this hierarchy contains non multiple value fields like SelectField !)

Also change AbstractValidator::Validate signature : now we are returning an array of error messages, so that we can return multiple ones
2023-07-03 11:30:04 +02:00
Pierre Goiffon
d085f15b6d N°6414 Separate SubFormField and Scalar fields
This will help to set methods as final, as SubFormField is often the sole one to have a real custom impl
2023-07-03 11:30:04 +02:00
Pierre Goiffon
6606af71ff N°6414 Validator refactoring
New AbstractValidator class, with new method Validate
All existing validators are now children of AbstractRegexpValidator
Handle validators JS counterparts in renderers : only regexp validators are implemented client side
2023-07-03 11:30:04 +02:00
Pierre Goiffon
52049b7837 N°6414 Disable Field validation for untouched attcodes 2023-07-03 11:30:04 +02:00
Pierre Goiffon
f40674ec85 N°6414 Replace SelectObjectField::VerifyCurrentValue by ResetCurrentValueIfNotAmongAllowedValues 2023-07-03 11:30:04 +02:00
Pierre Goiffon
d0cad4d829 N°1150 Fix regression : cannot add caselog in the user portal
Was caused by field value check added in MultipleChoicesField and SelectObjectField in b71cd218

With this commit the checks are now only done if we have a ContextTag::TAG_REST
2023-06-13 12:34:46 +02:00
Pierre Goiffon
b3ef634d21 N°1150 SelectObjectField : factorize DBObjectSet retrieval between Validate and VerifyCurrentValue 2023-06-13 12:34:46 +02:00
Benjamin Dalsass
465388b5e3 N°803 - Allow display & edition of attributes on n:n relations on Portal
- Issue when selecting links rows with checkbox
- Change linked set field validation to prevent checking host id -1
2023-06-12 17:26:34 +02:00
Benjamin Dalsass
c486aea299 N°803 - Allow display & edition of attributes on n:n relations on Portal
- Remove input when object is in view mode
- Improve form errors handling
- Prevent row selection when clicking input 
- Attach date time picker to table instead of input to prevent popup truncating (popup will be visible but not aligned on the input)
2023-06-09 10:34:19 +02:00
Benjamin Dalsass
8eb1053daa N°803 - Allow display & edition of attributes on n:n relations on Portal 2023-06-05 16:19:06 +02:00
Pierre Goiffon
4038d4d925 N°6314 N°1150 Fix cannot reopen or close a UR in the user portal
Since introduction of MultipleChoicesField and SelectObjectField value checks with b71cd218, when a portal user was trying to do an action on a resolved UR the agent_id field was rejected. The reason for the rejection is the corresponding SelectObjectField query is containing the portal user scopes (query generated in ObjectFormManager::Build), and of course the agent_id set isn't in this scope...

As a workaround we are disabling those checks for read only fields (values are set server side and possibly in a different context than the portal user)
2023-05-16 17:54:24 +02:00
Pierre Goiffon
b71cd2182f N°1150 Add value checks in MultipleChoicesField and SelectObjectField
Now current value is checked against list of possible values
2023-05-12 10:59:33 +02:00
Molkobain
c767ebe989 📝 Copyright year bump 2023-03-17 18:28:47 +01:00
Molkobain
da07fadfb3 N°5302 - PHP 8.1: Migrate some strlen() usages to internal method 2023-01-16 16:47:26 +01:00
Pierre Goiffon
74fbd12709 Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/src/Helper/ObjectFormHandlerHelper.php
#	datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig
2021-11-26 17:24:41 +01:00
acognet
8bf9987174 N°3592 - Migrate module to new UIBlock system : Customized request forms : allow null for value in function AddMetadata 2021-04-27 10:16:43 +02:00
Molkobain
4c289edac7 N°3887 - Harmonize number of autocomplete displayed results throughout the app 2021-04-06 14:50:31 +02:00
Molkobain
8dd96ea636 Copyright year bump 2021-03-15 09:29:45 +01:00
Molkobain
c3140c2db3 Copyright year bump 2021-03-12 18:48:46 +01:00
bruno-ds
9cbaced1f3 Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts:
#	core/config.class.inc.php
#	datamodels/2.x/itop-core-update/view/SelectUpdateFile.html.twig
#	datamodels/2.x/itop-core-update/view/SelectUpdateFile.ready.js.twig
#	setup/setuputils.class.inc.php
#	test/setup/SetupUtilsTest.php
2021-03-02 14:34:19 +01:00
bruno-ds
26bbdc1a57 Merge remote-tracking branch 'origin/support/2.7' into develop
# Conflicts:
#	application/cmdbabstract.class.inc.php
#	application/utils.inc.php
#	dictionaries/en.dictionary.itop.core.php
#	dictionaries/fr.dictionary.itop.core.php
#	setup/setuputils.class.inc.php
2021-02-23 08:58:29 +01:00
Molkobain
e419060e8a Add type hinting to methods parameters 2020-10-22 16:06:00 +02:00
Molkobain
cfd9dba66e N°2224 - Portal: Enable tooltips for object's attributes description 2020-10-22 16:05:59 +02:00
Molkobain
116c0c0138 Portal: Fix double HTML encoding of fields metadata (label, raw value) 2020-10-22 16:05:58 +02:00
Molkobain
71dbccd034 N°3216 - Refactor form files to be part of the autoloader 2020-07-30 15:22:16 +02:00