From 5232694c0485dc23a2b7f67e1d43f301d2f4eeaa Mon Sep 17 00:00:00 2001 From: jf-cbd Date: Fri, 21 Mar 2025 11:05:08 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B08281=20-=20Unable=20to=20click=20search?= =?UTF-8?q?=20button=20in=20multiple=20request=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/src/Form/ObjectFormManager.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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 99a0f5b35..5259ceacb 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 @@ -1107,15 +1107,17 @@ class ObjectFormManager extends FormManager // First we need to update the Object with its new values in order to enable the dependents fields to update $sObjectClass = get_class($this->oObject); foreach ($aCurrentValues as $sAttCode => $value) { - if (!array_key_exists($sAttCode, $this->aFieldsAtts)) { - continue; - } - $iAttributeFlags = $this->aFieldsAtts[$sAttCode]; - if ($iAttributeFlags & OPT_ATT_HIDDEN) { - continue; - } - if ($iAttributeFlags & OPT_ATT_READONLY) { - continue; + if (count($this->aFieldsAtts) !== 0) { + if (!array_key_exists($sAttCode, $this->aFieldsAtts)) { + continue; + } + $iAttributeFlags = $this->aFieldsAtts[$sAttCode]; + if ($iAttributeFlags & OPT_ATT_HIDDEN) { + continue; + } + if ($iAttributeFlags & OPT_ATT_READONLY) { + continue; + } } if (MetaModel::IsValidAttCode($sObjectClass, $sAttCode)) {