Просмотр исходного кода

Bug fix: proper handling of the validation of subforms...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3435 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 10 лет назад
Родитель
Сommit
3b222400ce
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      application/forms.class.inc.php

+ 4 - 4
application/forms.class.inc.php

@@ -108,7 +108,7 @@ class DesignerForm
 				$aRow = $oField->Render($oP, $sFormId);
 				if ($oField->IsVisible())
 				{
-					$sValidation = '&nbsp;<span class="prop_apply">'.$this->GetValidationArea($oField->GetCode()).'</span>';
+					$sValidation = '&nbsp;<span class="prop_apply">'.$this->GetValidationArea($oField->GetFieldId()).'</span>';
 					$sField = $aRow['value'].$sValidation;
 					$aDetails[] = array('label' => $aRow['label'], 'value' => $sField);
 				}
@@ -234,7 +234,7 @@ class DesignerForm
 				if ($oField->IsVisible())
 				{
 					$sFieldId = $this->GetFieldId($oField->GetCode());
-					$sValidation = $this->GetValidationArea($oField->GetCode(), '<span title="Apply" class="ui-icon ui-icon-circle-check"/>');
+					$sValidation = $this->GetValidationArea($sFieldId, '<span title="Apply" class="ui-icon ui-icon-circle-check"/>');
 					$sValidationFields = '</td><td class="prop_icon prop_apply">'.$sValidation.'</td><td  class="prop_icon prop_cancel"><span title="Revert" class="ui-icon ui-icon-circle-close"/></td>'.$this->EndRow();
 					
 					$sPath = $this->GetHierarchyPath().'/'.$oField->GetCode();
@@ -517,9 +517,9 @@ EOF
 		return 'attr_'.$sCode.$this->GetSuffix();
 	}
 	
-	public function GetValidationArea($sCode, $sContent = '')
+	public function GetValidationArea($sId, $sContent = '')
 	{
-		return "<span style=\"display:inline-block;width:20px;\" id=\"v_{$this->sFormPrefix}attr_$sCode\"><span class=\"ui-icon ui-icon-alert\"></span>$sContent</span>";
+		return "<span style=\"display:inline-block;width:20px;\" id=\"v_{$sId}\"><span class=\"ui-icon ui-icon-alert\"></span>$sContent</span>";
 	}
 	public function GetAsyncActionClass()
 	{