Skip to content

Commit

Permalink
Fix default filter
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-ph committed Apr 5, 2019
1 parent fff9b7d commit 285e60e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/tpl/extrafields_list_search_input.tpl.php
Expand Up @@ -23,10 +23,10 @@
$align=$extrafields->getAlignFlag($key);
$typeofextrafield=$extrafields->attributes[$extrafieldsobjectkey]['type'][$key];
print '<td class="liste_titre'.($align?' '.$align:'').'">';
$tmpkey=preg_replace('/'.$search_options_pattern.'/', '', $key);
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]))
{
$crit=$val;
$tmpkey=preg_replace('/'.$search_options_pattern.'/', '', $key);
$searchclass='';
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
Expand All @@ -37,7 +37,7 @@
// for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid')
$morecss='';
if ($typeofextrafield == 'sellist') $morecss='maxwidth200';
echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$key], '', '', 'search_', $morecss);
echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss);
}
elseif (in_array($typeofextrafield, array('datetime','timestamp')))
{
Expand Down

0 comments on commit 285e60e

Please sign in to comment.