瀏覽代碼

Always use a drop-down list for external keys in search forms

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

+ 8 - 1
application/ui.extkeywidget.class.inc.php

@@ -73,7 +73,14 @@ class UIExtKeyWidget
 		$sTargetClass = $oAttDef->GetTargetClass();
 		$iMaxComboLength = $oAttDef->GetMaximumComboLength();
 		$bAllowTargetCreation = $oAttDef->AllowTargetCreation();
-		$sDisplayStyle = $oAttDef->GetDisplayStyle();
+		if (!$bSearchMode)
+		{
+			$sDisplayStyle = $oAttDef->GetDisplayStyle();
+		}
+		else
+		{
+			$sDisplayStyle = 'select'; // In search mode, always use a drop-down list
+		}
 		$oWidget = new UIExtKeyWidget($sTargetClass, $iInputId);
 		return $oWidget->Display($oPage, $iMaxComboLength, $bAllowTargetCreation, $sTitle, $oAllowedValues, $value, $iInputId, $bMandatory, $sFieldName, $sFormPrefix, $aArgs, $bSearchMode, $sDisplayStyle);
 	}