- Fixed bug #225: improve friendliness of auto-complete

SVN:trunk[715]
This commit is contained in:
Denis Flaven
2010-08-30 12:02:36 +00:00
parent d2bad7d0fd
commit 1d0f0231a4
2 changed files with 5 additions and 1 deletions

View File

@@ -1029,6 +1029,10 @@ abstract class cmdbAbstractObject extends CMDBObject
{
// too many choices, use an autocomplete
// The input for the auto complete
if ($sDisplayValue == $oAttDef->GetNullValue()) // Null or zero is displayed as ''
{
$sDisplayValue = '';
}
$sHTMLValue = "<input count=\"".count($aAllowedValues)."\" type=\"text\" id=\"label_$iId\" size=\"30\" maxlength=\"255\" value=\"$sDisplayValue\"{$sCSSClasses}/>&nbsp;{$sValidationField}";
// another hidden input to store & pass the object's Id
$sHTMLValue .= "<input type=\"hidden\" id=\"$iId\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" value=\"$value\" />\n";