3print
'<!-- extrafields_list_search_input.tpl.php -->'.
"\n";
6if (empty($conf) || !is_object($conf)) {
7 print
"Error, template page can't be called as URL";
11if (empty($extrafieldsobjectkey) && is_object($object)) {
12 $extrafieldsobjectkey = $object->table_element;
16if (!empty($extrafieldsobjectkey)) {
17 if (!empty($extrafields->attributes[$extrafieldsobjectkey][
'label']) && is_array($extrafields->attributes[$extrafieldsobjectkey][
'label']) && count($extrafields->attributes[$extrafieldsobjectkey][
'label'])) {
18 if (empty($extrafieldsobjectprefix)) {
19 $extrafieldsobjectprefix =
'ef.';
21 if (empty($search_options_pattern)) {
22 $search_options_pattern =
'search_options_';
25 foreach ($extrafields->attributes[$extrafieldsobjectkey][
'label'] as $key => $val) {
26 if (!empty($arrayfields[$extrafieldsobjectprefix.$key][
'checked'])) {
27 $cssclass = $extrafields->getAlignFlag($key, $extrafieldsobjectkey);
28 $typeofextrafield = $extrafields->attributes[$extrafieldsobjectkey][
'type'][$key];
30 print
'<td class="liste_titre'.($cssclass ?
' '.$cssclass :
'').
'">';
31 $tmpkey = preg_replace(
'/'.$search_options_pattern.
'/',
'', $key);
32 if (in_array($typeofextrafield, array(
'varchar',
'mail',
'ip',
'url',
'int',
'double')) && empty($extrafields->attributes[$extrafieldsobjectkey][
'computed'][$key])) {
34 if (in_array($typeofextrafield, array(
'varchar',
'mail',
'ip',
'url'))) {
35 $searchclass =
'searchstring';
37 if (in_array($typeofextrafield, array(
'int',
'double'))) {
38 $searchclass =
'searchnum';
40 print
'<input class="flat'.($searchclass ?
' '.$searchclass :
'').
'" size="4" type="text" name="'.$search_options_pattern.$tmpkey.
'" value="'.
dol_escape_htmltag((empty($search_array_options[$search_options_pattern.$tmpkey]) ?
'' : $search_array_options[$search_options_pattern.$tmpkey])).
'">';
41 } elseif (in_array($typeofextrafield, array(
'date',
'datetime',
'timestamp'))) {
43 $preselectedvalues = (empty($search_array_options[$search_options_pattern.$tmpkey]) ?
'' : $search_array_options[$search_options_pattern.$tmpkey]);
45 echo $extrafields->showInputField($key, $preselectedvalues,
'',
'', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
49 if (in_array($typeofextrafield, array(
'link',
'sellist',
'text',
'html'))) {
50 $morecss =
'maxwidth200';
52 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);
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...