Merge pull request #10966 from atm-ph/fix_default_filter
Fix default filter
This commit is contained in:
commit
faf8803329
@ -23,10 +23,10 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
$align=$extrafields->getAlignFlag($key);
|
$align=$extrafields->getAlignFlag($key);
|
||||||
$typeofextrafield=$extrafields->attributes[$extrafieldsobjectkey]['type'][$key];
|
$typeofextrafield=$extrafields->attributes[$extrafieldsobjectkey]['type'][$key];
|
||||||
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
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]))
|
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]))
|
||||||
{
|
{
|
||||||
$crit=$val;
|
$crit=$val;
|
||||||
$tmpkey=preg_replace('/'.$search_options_pattern.'/', '', $key);
|
|
||||||
$searchclass='';
|
$searchclass='';
|
||||||
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
|
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
|
||||||
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
||||||
@ -37,7 +37,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
// 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')
|
// 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='';
|
$morecss='';
|
||||||
if ($typeofextrafield == 'sellist') $morecss='maxwidth200';
|
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')))
|
elseif (in_array($typeofextrafield, array('datetime','timestamp')))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user