18 require_once dirname(__FILE__).
'/../../form_question_rule/form_question_rule_edit_fns.inc';
46 function paintRule(&$asset, &$o, $prefix, $rule_data, $write_access, &$q_asset)
48 $operator_list = $asset->getOperators();
49 $options = $q_asset->getOptions();
52 $o->openField(translate(
'core_form_rule_details'));
53 echo translate(
'core_form_rule_selection_edit_'.(array_get_index($rule_data,
'operator', 1) ?
'true' :
'false'), $q_asset->getSummary($rule_data[
'value']));
59 $o->openField(translate(
'operator'));
61 combo_box($prefix.
'[operator]', $operator_list,
false, array_get_index($rule_data,
'operator', 1));
64 $o->openField(translate(
'option'));
66 combo_box($prefix.
'[value]', $options,
false, array_get_index($rule_data,
'value',
''));
83 if (!isset($_POST[$prefix]))
return false;
85 $operator = array_get_index($_POST[$prefix],
'operator', null);
86 $comparison = array_get_index($_POST[$prefix],
'value', null);
88 $rule_data[
'operator'] = $operator;
89 $rule_data[
'value'] = $comparison;