[freeside-commits] freeside/httemplate/elements select-cgp_rule_action.html, 1.1.2.5, 1.1.2.6 select-cgp_rule_condition.html, 1.1.2.4, 1.1.2.5

Ivan,,, ivan at wavetail.420.am
Thu Apr 29 19:17:35 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv19127/httemplate/elements

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	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.1.2.4
retrieving revision 1.1.2.5
diff -u -w -d -r1.1.2.4 -r1.1.2.5
--- select-cgp_rule_condition.html	29 Apr 2010 07:40:47 -0000	1.1.2.4
+++ select-cgp_rule_condition.html	30 Apr 2010 02:17:33 -0000	1.1.2.5
@@ -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.1.2.5
retrieving revision 1.1.2.6
diff -u -w -d -r1.1.2.5 -r1.1.2.6
--- select-cgp_rule_action.html	29 Apr 2010 07:40:47 -0000	1.1.2.5
+++ select-cgp_rule_action.html	30 Apr 2010 02:17:33 -0000	1.1.2.6
@@ -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