[freeside-commits] freeside/httemplate/elements select-cust_main-status.html, 1.1, 1.2 select-cust_pkg-status.html, 1.4, 1.5
Ivan,,,
ivan at wavetail.420.am
Fri Sep 18 15:35:31 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv15289
Modified Files:
select-cust_main-status.html select-cust_pkg-status.html
Log Message:
fix customer and package status conditions not sticky on edit, noticed on RT#6150
Index: select-cust_pkg-status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-cust_pkg-status.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- select-cust_pkg-status.html 1 Aug 2007 22:25:09 -0000 1.4
+++ select-cust_pkg-status.html 18 Sep 2009 22:35:29 -0000 1.5
@@ -8,7 +8,9 @@
% foreach my $option ( @{ $opt{'statuses'} } ) {
<OPTION VALUE="<% $option %>"
- <% $option eq $curr_value ? 'SELECTED' : '' %>
+ <% ref($value) && $value->{$option} || $option eq $value
+ ? 'SELECTED' : ''
+ %>
><% $option %>
% }
@@ -25,6 +27,7 @@
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
-my $curr_value = $opt{'curr_value'} || $opt{'value'};
+my $value = $opt{'curr_value'} || $opt{'value'};
+$value = [ split(/\s*,\s*/, $value) ] if $opt{'multiple'} && $value =~ /,/;
</%init>
Index: select-cust_main-status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-cust_main-status.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- select-cust_main-status.html 1 Aug 2007 22:25:09 -0000 1.1
+++ select-cust_main-status.html 18 Sep 2009 22:35:29 -0000 1.2
@@ -8,7 +8,9 @@
% foreach my $option ( @{ $opt{'statuses'} } ) {
<OPTION VALUE="<% $option %>"
- <% $option eq $curr_value ? 'SELECTED' : '' %>
+ <% ref($value) && $value->{$option} || $option eq $value
+ ? 'SELECTED' : ''
+ %>
><% $option %>
% }
@@ -25,6 +27,7 @@
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
-my $curr_value = $opt{'curr_value'} || $opt{'value'};
+my $value = $opt{'curr_value'} || $opt{'value'};
+$value = [ split(/\s*,\s*/, $value) ] if $opt{'multiple'} && $value =~ /,/;
</%init>
More information about the freeside-commits
mailing list