diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index a952c7bb873b764a8077edc57341a8fa2c510bcc..ea0e1ce2de28cd0365cbaa677e9ad5a5505b5de8 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -297,7 +297,7 @@ foreach ($search_array_options as $key => $val) $tmpkey=preg_replace('/search_options_/','',$key); $typ=$extrafields->attribute_type[$tmpkey]; $mode=0; - if (in_array($typ, array('int'))) $mode=1; // Search on a numeric + if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) { $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); @@ -550,12 +550,15 @@ if ($result) $align=$extrafields->getAlignFlag($key); $typeofextrafield=$extrafields->attribute_type[$key]; print '<td class="liste_titre'.($align?' '.$align:'').'">'; - if (in_array($typeofextrafield, array('varchar', 'int', 'select'))) - { - $crit=$val; - $tmpkey=preg_replace('/search_options_/','',$key); - print '<input class="flat" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">'; - } + if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select'))) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $searchclass=''; + if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring'; + if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum'; + print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">'; + } print '</td>'; } }