[freeside-commits] freeside/httemplate/elements select-cgp_rule_action.html, 1.4, 1.5 select-cgp_rule_condition.html, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Thu Apr 29 19:32:41 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv19603/httemplate/elements
Modified Files:
select-cgp_rule_action.html select-cgp_rule_condition.html
Log Message:
communigate (phase 2): rules: show conditions/actions on rule browse, fix rule edit for conditions and actions without op/param, fix rule edit stickiness on errors. RT#7514
Index: select-cgp_rule_condition.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-cgp_rule_condition.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- select-cgp_rule_condition.html 29 Apr 2010 07:40:45 -0000 1.3
+++ select-cgp_rule_condition.html 30 Apr 2010 02:32:39 -0000 1.4
@@ -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 @@
$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' : '';
Index: select-cgp_rule_action.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-cgp_rule_action.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- select-cgp_rule_action.html 29 Apr 2010 07:40:46 -0000 1.4
+++ select-cgp_rule_action.html 30 Apr 2010 02:32:39 -0000 1.5
@@ -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 @@
$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"' : '';
</%init>
More information about the freeside-commits
mailing list