X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-cgp_rule_condition.html;h=622cbe86dc32cfc4bc0a3e7b42d1961cd0bbc318;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=0c305d9166432ad920fbecf492396826fb1d387f;hpb=2ac302e18d723563692cdbbd74f3e9e5331a3014;p=freeside.git diff --git a/httemplate/elements/select-cgp_rule_condition.html b/httemplate/elements/select-cgp_rule_condition.html index 0c305d916..622cbe86d 100644 --- a/httemplate/elements/select-cgp_rule_condition.html +++ b/httemplate/elements/select-cgp_rule_condition.html @@ -6,8 +6,7 @@ 'field' => $name.'_condition', 'id' => $id.'_condition', 'options' => \@conditions, - 'curr_value' => scalar($cgi->param($name.'_condition')) - || $cgp_rule_condition->condition, + 'curr_value' => $condition, '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 $condition = scalar($cgi->param($name.'_condition')) + || $cgp_rule_condition->condition; + +my @op = &$cond2op($condition); my $disabled = scalar(@op) ? '' : 1; my $style = $disabled ? 'visibility:hidden' : '';