[interchange-cvs] interchange - racke modified dist/lib/UI/pages/admin/payment.html

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon Aug 4 21:30:13 UTC 2008


User:      racke
Date:      2008-08-04 21:30:13 GMT
Modified:  dist/lib/UI/pages/admin payment.html
Log:
simplify codde which fixes also #209

Revision  Changes    Path
2.8                  interchange/dist/lib/UI/pages/admin/payment.html


rev 2.8, prev_rev 2.7
Index: payment.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/payment.html,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- payment.html	23 Apr 2005 18:10:07 -0000	2.7
+++ payment.html	4 Aug 2008 21:30:13 -0000	2.8
@@ -13,11 +13,7 @@
 	delete $Scratch->{change_payment};
 	return unless $CGI->{change_payment} eq 'do';
 	$Scratch->{change_payment} = 1;
-	for (my $i = 1; $i < 1000; $i++) {
-		last unless defined $CGI->{"cc_accepted$i"};
-		push @cc, $CGI->{"cc_accepted$i"};
-	}
-	$Scratch->{CREDIT_CARDS_ACCEPTED} = join " ", @cc;
+	$Scratch->{CREDIT_CARDS_ACCEPTED} = join " ", grep {/\S/} @{$CGI_array->{cc_accepted}};
 	$Scratch->{PO_ACCEPTED} = $CGI->{po};
 	$Scratch->{COD_ACCEPTED} = $CGI->{cod};
 	$Scratch->{POSTAL_ACCEPTED} = $CGI->{postal};
@@ -91,7 +87,7 @@
 
 <td class=rnorm>
 
-<select name="cc_accepted[loop-increment]">
+<select name="cc_accepted">
 <option value=""> [L]Not Accepted[/L]
 <option value="[loop-code]" [if-loop-pos 2]SELECTED[/if-loop-pos]> [L]Accepted[/L]
 </select>







More information about the interchange-cvs mailing list