1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee">
<script language="JavaScript"><!--
var mywindow = -1;
function myopen(filename,windowname,properties) {
myclose();
mywindow = window.open(filename,windowname,properties);
}
function myclose() {
if ( mywindow != -1 )
mywindow.close();
mywindow = -1
}
//--></script>
<FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<FONT SIZE=4>Change payment information</FONT><BR><BR>
<%= if ( $error ) {
$OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!;
} ''; %>
<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
<%=
use Tie::IxHash;
use HTML::Widgets::SelectLayers;
my $preauto = '<TR><TD COLSPAN=3><INPUT TYPE="checkbox" NAME="auto" VALUE="1"';
my $postauto = '>Charge future payments to this card automatically</TD></TR>';
my $tail = qq(</TABLE><INPUT TYPE="hidden" NAME="session" VALUE="$session_id">).
qq(<INPUT TYPE="hidden" NAME="action" VALUE="process_change_pay">).
qq(<BR>).
qq(<INPUT TYPE="submit" NAME="process" ).
qq(VALUE="Save payment information"> ).
qq(<!-- onClick="this.disabled=true"> -->);
my %paybychecked = (
'BILL' => include('bill'),
'CARD' => include('card')."$preauto CHECKED $postauto",
'DCRD' => include('card')."$preauto $postauto",
'CHEK' => include('check')."$preauto CHECKED $postauto",
'DCHK' => include('check')."$preauto $postauto",
);
my %payby_index = ( 'CARD' => qq/Credit Card/,
'DCRD' => qq/Credit Card/,
'CHEK' => qq/Check/,
'DCHK' => qq/Check/,
'LECB' => qq/Phone Bill Billing/,
'BILL' => qq/Billing/,
'COMP' => qq/Complimentary/,
'PREPAY' => qq/Prepaid Card/,
);
tie my %options, 'Tie::IxHash', ();
foreach my $payby_option ( @paybys ) {
$options{$payby_option} = $payby_index{$payby_option};
}
$options{$payby} = $payby_index{$payby}
unless exists($options{$payby});
HTML::Widgets::SelectLayers->new(
options => \%options,
selected_layer => $payby,
# form_name => 'dummy',
# form_action => 'dummy.cgi',
layer_callback => sub { my $layer = shift; return '<TABLE BGCOLOR="#cccccc">'.$paybychecked{$layer}.qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$layer">$tail!; },
)->html;
%>
</TD></TR></TABLE>
<HR>
<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
</BODY></HTML>
|