Skip to content
Snippets Groups Projects
Commit 1ee76601 authored by Jared Hancock's avatar Jared Hancock Committed by Peter Rotich
Browse files

queue: Fix edit of queue column conditions

parent 03639c1b
No related branches found
No related tags found
No related merge requests found
......@@ -513,6 +513,10 @@ class QueueColumnCondition {
return $name;
}
function getCriteria() {
return $this->config['crit'];
}
function getSearchQ($query) {
list($name, $method, $value) = $this->config['crit'];
......
......@@ -22,11 +22,19 @@
$parts = SavedSearch::getSearchField($field, $field_name);
// Drop the search checkbox field
unset($parts["{$field_name}+search"]);
list(, $crit_method, $crit_value) = $condition->getCriteria();
foreach ($parts as $name=>$F) {
if (substr($name, -7) == '+method')
if (substr($name, -7) == '+method') {
// XXX: Hack — drop visibility connection between the method drop-down
// and the enabled checkbox
unset($F->ht['visibility']);
// Set the select method, if any
if ($crit_method)
$F->value = $crit_method;
}
if ($crit_value && strpos($name, "+{$crit_method}") > 0) {
$F->value = $crit_value;
}
}
$form = new SimpleForm($parts, false, array('id' => $id));
foreach ($form->getFields() as $F) { ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment