X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fselect-cgp_rule_condition.html;h=bc96ab48774cfe6b1b21a354d1b74629d6ac4341;hp=0c305d9166432ad920fbecf492396826fb1d387f;hb=37e92c220a54636ebc7900cd59ec6ce56790ede8;hpb=2ac302e18d723563692cdbbd74f3e9e5331a3014 diff --git a/httemplate/elements/select-cgp_rule_condition.html b/httemplate/elements/select-cgp_rule_condition.html index 0c305d916..bc96ab487 100644 --- a/httemplate/elements/select-cgp_rule_condition.html +++ b/httemplate/elements/select-cgp_rule_condition.html @@ -3,11 +3,10 @@ <% include( 'select.html', - 'field' => $name.'_condition', - 'id' => $id.'_condition', + 'field' => $name.'_conditionname', + 'id' => $id.'_conditionname', 'options' => \@conditions, - 'curr_value' => scalar($cgi->param($name.'_condition')) - || $cgp_rule_condition->condition, + 'curr_value' => $conditionname, 'labels' => { '' => 'Select Condition' }, 'onchange' => $name.'_changed', ) @@ -190,7 +189,10 @@ if ( $curr_value ) { $cgp_rule_condition = new FS::cgp_rule_condition {}; } -my @op = &$cond2op($curr_value); +my $conditionname = scalar($cgi->param($name.'_conditionname')) + || $cgp_rule_condition->conditionname; + +my @op = &$cond2op($conditionname); my $disabled = scalar(@op) ? '' : 1; my $style = $disabled ? 'visibility:hidden' : '';