Hide advanced rule modifier for 'date' and 'currentdate' rules

pull/129/head
Aleksander Machniak 11 years ago
parent 962eff7dfe
commit 8f62cfa4c8

@ -1441,7 +1441,7 @@ class rcube_sieve_engine
$select_type->add(rcube::Q($this->plugin->gettext('detail')), 'detail'); $select_type->add(rcube::Q($this->plugin->gettext('detail')), 'detail');
} }
$need_mod = $rule['test'] != 'size' && $rule['test'] != 'body'; $need_mod = !in_array($rule['test'], array('size', 'body', 'date', 'currentdate'));
$mout = '<div id="rule_mod' .$id. '" class="adv"' . (!$need_mod ? ' style="display:none"' : '') . '>'; $mout = '<div id="rule_mod' .$id. '" class="adv"' . (!$need_mod ? ' style="display:none"' : '') . '>';
$mout .= ' <span class="label">' . rcube::Q($this->plugin->gettext('modifier')) . ' </span>'; $mout .= ' <span class="label">' . rcube::Q($this->plugin->gettext('modifier')) . ' </span>';
$mout .= $select_mod->show($rule['test']); $mout .= $select_mod->show($rule['test']);

Loading…
Cancel
Save