1 [% PROCESS "default/opac/parts/header.tt2";
2 PROCESS "default/opac/parts/misc_util.tt2";
3 WRAPPER "default/opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "payment_form";
7 <div id="pay_fines_now">
8 <form action="[% ctx.opac_root %]/myopac/pay" method="POST">
9 [% FOR xact IN CGI.param('xact') %]
10 <input type="hidden" name="xact" value="[% xact | html %]" />
15 <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
16 <td rowspan='13' valign='top'>
17 [% l('Selected fines you are paying for:') %]
18 <table cellpadding="0" cellspacing="5" border="0">
21 <th>[% l('Name') %]</th>
22 <th>[% l('Amount') %]</th>
28 FOR f IN ctx.fines.circulation;
29 NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
30 attrs = {marc_xml => f.marc_xml};
32 PROCESS get_marc_attrs args=attrs;
33 ELSIF f.xact.reservation;
34 attrs.title = f.xact.reservation.target_resource_type.name;
36 # XXX use fixed point math
37 pay_total = pay_total + f.xact.balance_owed; %]
39 <td>[% attrs.title %]</td>
40 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
44 FOR f IN ctx.fines.grocery;
45 NEXT UNLESS CGI.param('xact').grep(f.xact.id).size;
46 # XXX use fixed point math
47 pay_total = pay_total + f.xact.balance_owed; %]
49 <td>[% f.xact.last_billing_type %]</td>
50 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
57 [% l('Total amount to pay:') %]
58 [%# XXX TODO: calculate pay_total not here in the
59 template but rather in the mod_perl, and only
60 proceed when that number is positive %]
61 <strong>[% money(pay_total) %]</strong>
64 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
68 <td>[% l('First Name') %]</td>
69 <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
72 <td>[% l('Last Name') %]</td>
73 <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
76 <td>[% l('Street Address') %]</td>
77 <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
80 <td>[% l('City' )%]</td>
81 <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
84 <td>[% l('State or Province') %]</td>
85 <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
88 <td>[% l('ZIP or Postal Code') %]</td>
89 <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
92 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
94 <!-- Technically not needed since card type is derived from the CC number
99 <option value='VISA'>VISA</option>
100 <option value='MasterCard'>MasterCard</option>
101 <option value='American Express'>American Express</option>
107 <td>[% l('Credit Card #') %]</td>
108 <td><input type="text" name="number" maxlength="16" /></td>
112 <div style="position:absolute;">
113 <div style="position:relative;left:80px;">
115 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
118 [% l('Security Code') %]
121 <input type="text" size="4" maxlength="5" name="cvv2" />
125 <td>[% l('Exipration Month') %]</td>
127 <select name="expire_month">
128 <option value="01">[% l("January") %]</option>
129 <option value="02">[% l("February") %]</option>
130 <option value="03">[% l("March") %]</option>
131 <option value="04">[% l("April") %]</option>
132 <option value="05">[% l("May") %]</option>
133 <option value="06">[% l("June") %]</option>
134 <option value="07">[% l("July") %]</option>
135 <option value="08">[% l("August") %]</option>
136 <option value="09">[% l("September") %]</option>
137 <option value="10">[% l("October") %]</option>
138 <option value="11">[% l("November") %]</option>
139 <option value="12">[% l("December") %]</option>
144 <td>[% l('Expiration Year') %]</td>
146 <select name="expire_year">
147 [% year = date.format(date.now, '%Y');
149 WHILE y < year + 10; # show ten years starting now %]
150 <option value="[% y %]">[% y %]</option>
156 <td colspan='2' align="center">
157 <input type="submit" value="[% l('Submit Payment') %]" />
158 <input type="reset" value="[% l('Cancel') %]"
159 onclick="location.history.go(-1);" />
162 [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]