Explorar o código

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 %!s(int64=13) %!d(string=hai) anos
pai
achega
7e735580bd
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  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);
 	}