瀏覽代碼

- Display the description on the field label when modifying/creating an object.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@449 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 年之前
父節點
當前提交
c6138547ff
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      application/cmdbabstract.class.inc.php
  2. 1 1
      application/uiwizard.class.inc.php

+ 1 - 1
application/cmdbabstract.class.inc.php

@@ -202,7 +202,7 @@ abstract class cmdbAbstractObject extends CMDBObject
 				{
 					$sDisplayValue = $this->GetAsHTML($sAttCode);
 				}
-				$aDetails[] = array('label' => MetaModel::GetLabel($sClass, $sAttCode), 'value' => $sDisplayValue);
+				$aDetails[] = array('label' => '<span title="'.MetaModel::GetDescription($sClass, $sAttCode).'">'.MetaModel::GetLabel($sClass, $sAttCode).'</span>', 'value' => $sDisplayValue);
 			}
 		}
 		$sHtml .= $oPage->GetDetails($aDetails);

+ 1 - 1
application/uiwizard.class.inc.php

@@ -86,7 +86,7 @@ class UIWizard
 				$oDefaultValuesSet = $oAttDef->GetDefaultValue(/* $oObject->ToArgs() */); // @@@ TO DO: get the object's current value if the object exists
 				$sHTMLValue = cmdbAbstractObject::GetFormElementForField($this->m_oPage, $this->m_sClass, $sAttCode, $oAttDef, $oDefaultValuesSet, '', "att_$iMaxInputId", '', $iOptions, $aArgs);
 				$aFieldsMap["att_$iMaxInputId"] = $sAttCode;
-				$aDetails[] = array('label' => $oAttDef->GetLabel().$sFieldFlag, 'value' => "<span id=\"field_att_$iMaxInputId\">$sHTMLValue</span>");
+				$aDetails[] = array('label' => '<span title="'.$oAttDef->GetDescription().'">'.$oAttDef->GetLabel().$sFieldFlag.'</span>', 'value' => "<span id=\"field_att_$iMaxInputId\">$sHTMLValue</span>");
 				if ($oAttDef->GetValuesDef() != null)
 				{
 					$sJSHandlerCode .= "\toWizardHelper.RequestAllowedValues('$sAttCode');\n";