Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
9ec4575c43
2 changed files with 19 additions and 3 deletions
|
|
@ -47,7 +47,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table
|
|||
if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) {
|
||||
$morecss = 'maxwidth200';
|
||||
}
|
||||
echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
|
||||
echo $extrafields->showInputField($key, (!isset($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,24 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr
|
|||
$param .= '&'.$search_options_pattern.$tmpkey.'_endmin='.dol_print_date($val['end'], '%M');
|
||||
$val = '';
|
||||
}
|
||||
if ($val != '') {
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
|
||||
if ($val !== '') {
|
||||
if (is_array($val)) {
|
||||
foreach ($val as $val2) {
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
|
||||
}
|
||||
} else {
|
||||
// test if we have checkbox type, we add the _multiselect needed into param
|
||||
$tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key);
|
||||
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('checkbox', 'chkbxlst'))) {
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'_multiselect='.urlencode($val);
|
||||
}
|
||||
// test if we have boolean type, we add the _booleand needed into param
|
||||
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('boolean'))) {
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'_boolean='.urlencode($val);
|
||||
}
|
||||
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue