Skip to content
Snippets Groups Projects
Commit 3d4313f2 authored by Jared Hancock's avatar Jared Hancock
Browse files

search: Fix dropped fields when editing advanced search

parent 5e8152a3
No related branches found
No related tags found
No related merge requests found
......@@ -970,6 +970,10 @@ class FormField {
return __('%s contains "%s"');
case 'match':
return __('%s matches pattern %s');
case 'includes':
return __('%s in (%s)');
case '!includes':
return __('%s not in (%s)');
}
}
function describeSearch($method, $value, $name=false) {
......
......@@ -1055,6 +1055,17 @@ class AssigneeChoiceField extends ChoiceField {
}
return $Q;
}
function describeSearchMethod($method) {
switch ($method) {
case 'assigned':
return __('assigned');
case '!assigned':
return __('unassigned');
default:
return parent::describeSearchMethod($method);
}
}
}
class TicketStateChoiceField extends ChoiceField {
......
......@@ -16,6 +16,7 @@ $errors = !!$form->errors();
$inbody = false;
$first_field = true;
foreach ($form->getFields() as $name=>$field) {
?><input type="hidden" name="fields[]" value="<?php echo $name; ?>"/><?php
@list($name, $sub) = explode('+', $field->get('name'), 2);
if ($sub === 'search') {
if (!$first_field) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment