allow NOT in customfield search of type select

This commit is contained in:
Cornelius Weiß 2005-11-10 12:10:17 +00:00
parent 04f215beee
commit b57aaf28af
2 changed files with 16 additions and 4 deletions

View File

@ -211,6 +211,7 @@
foreach($value as $haystack => $needle)
{
if($needle == '') unset($value[$haystack]);
elseif($haystack{0} != '!' && $needle{0} != '!' && $value['!'.$haystack] == 1 ) $value[$haystack] = '!'.$value[$haystack];
}
$extension_data['result_nm']['search_values'] = $value;
}
@ -266,4 +267,4 @@
return count($result);
}
}
}

View File

@ -98,12 +98,23 @@
$field['values'][$key] = $val;
}
}
$input = &$tpl->new_cell($n,'select','',$this->prefix.$name,array(
$input = &$tpl->new_cell($n,'hbox');
if($this->advanced_search)
{
$not = &$tpl->add_child($input, $check = &$tpl->empty_cell('checkbox','!'.$this->prefix.$name,array(
'label' => 'NOT',
'no_lang' => True
)));
unset($not);
unset($check);
}
$select = &$tpl->add_child($input, $item = &$tpl->empty_cell('select',$this->prefix.$name,array(
'sel_options' => $field['values'],
'size' => $field['rows'],
'no_lang' => True
));
)));
unset($select);
unset($item);
break;
case 'label' :
$label['span'] = 'all';