From d9e7cacc840cbb722511f11c8f026b8f9917b04a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Sep 2020 14:16:59 +0200 Subject: [PATCH] Fix search --- htdocs/ticket/list.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 12dd4c37058..91d84270a30 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -659,11 +659,15 @@ foreach ($object->fields as $key => $val) if ($search[$key]) $selectedarray = array_values($search[$key]); print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth150', 1, 0, '', '', ''); print ''; - } elseif ($key == "fk_soc") - { + } elseif ($key == "fk_soc") { print ''; } else { - print ''; + print ''; + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + elseif (strpos($val['type'], 'integer:') === 0) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + print ''; } } }