Search on select list is supported for extra fields

This commit is contained in:
Laurent Destailleur 2016-03-03 12:09:13 +01:00
parent 360e202582
commit aa34dffef5

View File

@ -778,11 +778,12 @@ if ($resql)
{ {
if (! empty($arrayfields["ef.".$key]['checked'])) if (! empty($arrayfields["ef.".$key]['checked']))
{ {
print '<td class="liste_titre">'; $typeofextrafield=$extrafields->attribute_type[$key];
$typeofextrafield=$extrafields->attribute_type[$key]; if (in_array($typeofextrafield, array('int'))) print '<td class="liste_titre right">';
if (in_array($typeofextrafield, array('varchar', 'int'))) else print '<td class="liste_titre">';
if (in_array($typeofextrafield, array('varchar', 'int', 'select')))
{ {
$crit=$val; $crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key); $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]).'">'; print '<input class="flat" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
} }