From: ivan Date: Tue, 20 Oct 2009 18:30:13 +0000 (+0000) Subject: don't show duplicate 'Credit card' or 'Check' choices even when signup_server-payby... X-Git-Tag: root_of_svc_elec_features~764 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=73b634da29738860b0821410f5d9c3a5b5c6228c;hp=ef25e3423f6b3d939f2cfb5f35150d5da8f0251d;p=freeside.git don't show duplicate 'Credit card' or 'Check' choices even when signup_server-payby has CARD & DCRD (or CHEK & DCHK) --- diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html index e7a996931..bbe452786 100644 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html @@ -46,6 +46,17 @@ $options{$payby} = $payby_index{$payby} unless exists($options{$payby}); + #don't want to show multiple "Credit card" or "Check" options + my %paybyremove = ( + 'CARD' => 'DCRD', + 'DCRD' => 'CARD', + 'CHEK' => 'DCHK', + 'DCHK' => 'CHEK', + ); + delete( $options{ $paybyremove{$payby} } ); + delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'}; + delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'}; + HTML::Widgets::SelectLayers->new( options => \%options, selected_layer => $payby,