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 if ($extrafields->attributes[$extrafieldsobjectkey][
'type'][$key] ==
'separate') {
30 $cssclass = $extrafields->getAlignFlag($key, $extrafieldsobjectkey);
31 $typeofextrafield = $extrafields->attributes[$extrafieldsobjectkey][
'type'][$key];
32 print
'<td class="liste_titre'.($cssclass ?
' '.$cssclass :
'').
'">';
33 $tmpkey = preg_replace(
'/'.$search_options_pattern.
'/',
'', $key);
34 if (in_array($typeofextrafield, array(
'varchar',
'mail',
'ip',
'url',
'int',
'double')) && empty($extrafields->attributes[$extrafieldsobjectkey][
'computed'][$key])) {
36 if (in_array($typeofextrafield, array(
'varchar',
'mail',
'ip',
'url'))) {
37 $searchclass =
'searchstring';
39 if (in_array($typeofextrafield, array(
'int',
'double'))) {
40 $searchclass =
'searchnum';
42 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])).
'">';
43 } elseif (in_array($typeofextrafield, array(
'date',
'datetime',
'timestamp'))) {
45 $preselectedvalues = (empty($search_array_options[$search_options_pattern.$tmpkey]) ?
'' : $search_array_options[$search_options_pattern.$tmpkey]);
47 echo $extrafields->showInputField($key, $preselectedvalues,
'',
'', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
51 if (in_array($typeofextrafield, array(
'link',
'sellist',
'text',
'html'))) {
52 $morecss =
'maxwidth200';
54 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);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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...