Преглед на файлове

LinkedSets can be read-only too...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1899 a333f486-631f-4898-b8df-5754b55c2be0
dflaven преди 13 години
родител
ревизия
e36c343a8f
променени са 1 файла, в които са добавени 10 реда и са изтрити 9 реда
  1. 10 9
      application/cmdbabstract.class.inc.php

+ 10 - 9
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')
 				{