X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-cgp_rule_action.html;h=7cefdc4b53fe0da9471594381875d6539487edfc;hb=f2ee4eec34fea420c1c434194e410f31b6c9edb0;hp=9ac93063314bf5ee0b5526be049f47479fe76518;hpb=2ac302e18d723563692cdbbd74f3e9e5331a3014;p=freeside.git diff --git a/httemplate/elements/select-cgp_rule_action.html b/httemplate/elements/select-cgp_rule_action.html index 9ac930633..7cefdc4b5 100644 --- a/httemplate/elements/select-cgp_rule_action.html +++ b/httemplate/elements/select-cgp_rule_action.html @@ -6,8 +6,7 @@ 'field' => $name.'_action', 'id' => $id.'_action', 'options' => \@actions, - 'curr_value' => scalar($cgi->param($name.'_action')) - || $cgp_rule_action->action, + 'curr_value' => $action, 'labels' => { '' => 'Select Action' }, 'onchange' => $name.'_changed', 'style' => 'vertical-align:top', @@ -108,7 +107,10 @@ if ( $curr_value ) { $cgp_rule_action = new FS::cgp_rule_action {}; } -my $disabled = $noparam{$curr_value} ? 'DISABLED' : ''; +my $action = scalar($cgi->param($name.'_action')) + || $cgp_rule_action->action; + +my $disabled = $noparam{$action} ? 'DISABLED' : ''; my $style = $disabled ? 'STYLE="visibility:hidden"' : '';