-
Notifications
You must be signed in to change notification settings - Fork 78
[Feature] Allow multiple "Insertion in the form" (dom) blocks per entity #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JeremieMercier
wants to merge
18
commits into
pluginsGLPI:main
Choose a base branch
from
JeremieMercier:feature/multiple-dom-blocks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9910700
[Feature] Allow multiple "Insertion in the form" (dom) blocks per entity
JeremieMercier 67b011b
Modified the container.form.php file to "clean" the form data (by rem…
JeremieMercier 13ea826
fix: Undefined array key "entities_id"
JeremieMercier 519a5bd
fix: PHPStan warnings in findContainers()
JeremieMercier eb05cad
update: use GLPI DBIterator
JeremieMercier 2d442f9
update: container.class.php
JeremieMercier ab8560c
fix: last change
JeremieMercier 58f8e34
update for phpstan
JeremieMercier 621bfe2
update: findContainers method to use entityId instead of itemId
JeremieMercier 43469a6
test(fields): add PHPUnit test suite for plugin
JeremieMercier 3aedb41
composer lock generate
JeremieMercier 9fa7eb3
chore(composer): sync lock (phpunit + phpstan bump)
JeremieMercier 660a6d4
composer update
JeremieMercier d685bc5
Simplify bootstrap and standardize phpunit config
JeremieMercier 246a764
fix(container): correct entity ID and add 'use Glpi\DBAL\QueryExpress…
JeremieMercier 829e78a
php cs fixer
JeremieMercier aaf0f14
Add licence header
JeremieMercier 9f6178f
fix fusion
JeremieMercier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ dist/ | |
| vendor/ | ||
| .gh_token | ||
| *.min.* | ||
| *.cache | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,17 @@ | |
| } elseif (isset($_POST['update_fields_values'])) { | ||
| $right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_POST['plugin_fields_containers_id']); | ||
| if ($right > READ) { | ||
| $containerID = $_POST['plugin_fields_containers_id']; | ||
| $data = []; | ||
| foreach ($_REQUEST as $key => $value) { | ||
| // if key starts with plugin_fields_<containerID>_ remove the prefix | ||
| if (strpos($key, "plugin_fields_{$containerID}_") === 0) { | ||
| $new_key = substr($key, strlen("plugin_fields_{$containerID}_")); | ||
| $data[$new_key] = $value; | ||
| } else { | ||
| $data[$key] = $value; | ||
| } | ||
| } | ||
| $container->updateFieldsValues($_REQUEST, $_REQUEST['itemtype'], false); | ||
|
Comment on lines
+60
to
71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| Html::back(); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff downgrades
sebastian/difffrom6.0.2(PHP>=8.2, dev-requiresphpunit/phpunit ^11.0) to4.0.6(PHP>=7.3, dev-requiresphpunit/phpunit ^9.3), alongside an unrelatedphpstan/phpstanpatch bump. This looks like stale lockfile drift from an out-of-sync branch rather than an intentional change for this feature. Suggest regenerating the lockfile with a cleancomposer updateagainst currentcomposer.jsonbefore merge.