Skip to content

[Feature] Notification target ticket #943

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
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
11 changes: 11 additions & 0 deletions front/container.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,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);
}
Html::back();
Expand Down
Loading