diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index b6623b5e5..00e7e174a 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -252,16 +252,17 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay $sCount = " ($iCount)"; } $oPage->SetCurrentTab($oAttDef->GetLabel().$sCount); - if ($bEditMode) + if ($this->IsNew()) + { + $iFlags = $this->GetInitialStateAttributeFlags($sAttCode); + } + else + { + $iFlags = $this->GetAttributeFlags($sAttCode); + } + $bReadOnly = ($iFlags & (OPT_ATT_READONLY|OPT_ATT_SLAVE)); + if ($bEditMode && (!$bReadOnly)) { - if ($this->IsNew()) - { - $iFlags = $this->GetInitialStateAttributeFlags($sAttCode); - } - else - { - $iFlags = $this->GetAttributeFlags($sAttCode); - } $sInputId = $this->m_iFormId.'_'.$sAttCode; if (get_class($oAttDef) == 'AttributeLinkedSet') {