瀏覽代碼

Typo: sKey => iKey.
Prefix for the dialogs to prevent a collision of IDs

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3371 a333f486-631f-4898-b8df-5754b55c2be0

dflaven 10 年之前
父節點
當前提交
87a1ddda86
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      application/forms.class.inc.php

+ 3 - 1
application/forms.class.inc.php

@@ -333,6 +333,8 @@ EOF
 	
 	public function RenderAsDialog($oPage, $sDialogId, $sDialogTitle, $iDialogWidth, $sOkButtonLabel, $sIntroduction = null)
 	{
+		$this->SetPrefix('dlg_'); // To make sure that the controls have different IDs that the property sheet which may be displayed at the same time
+		
 		$sDialogTitle = addslashes($sDialogTitle);
 		$sOkButtonLabel = addslashes($sOkButtonLabel);
 		$sCancelButtonLabel = Dict::S('UI:Button:Cancel');
@@ -1360,7 +1362,7 @@ class DesignerFormSelectorField extends DesignerFormField
 				if ($iKey == $this->defaultValue) // Default value is actually the index
 				{
 					$sDisplayValue = htmlentities($aFormData['label'], ENT_QUOTES, 'UTF-8');
-					$sHiddenValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"".htmlentities($sKey, ENT_QUOTES, 'UTF-8')."\"/>";
+					$sHiddenValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"".htmlentities($iKey, ENT_QUOTES, 'UTF-8')."\"/>";
 					break;
 				}
 			}