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 IF CGI.param('xact').size &&
30 !CGI.param('xact').grep(f.xact.id).size;
31 attrs = {marc_xml => f.marc_xml};
33 PROCESS get_marc_attrs args=attrs;
34 ELSIF f.xact.reservation;
35 attrs.title = f.xact.reservation.target_resource_type.name;
37 # XXX use fixed point math
38 pay_total = pay_total + f.xact.balance_owed; %]
40 <td>[% attrs.title %]</td>
41 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
45 FOR f IN ctx.fines.grocery;
46 NEXT IF CGI.param('xact').size &&
47 !CGI.param('xact').grep(f.xact.id).size;
48 # XXX use fixed point math
49 pay_total = pay_total + f.xact.balance_owed; %]
51 <td>[% f.xact.last_billing_type %]</td>
52 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
59 [% l('Total amount to pay:') %]
60 [%# XXX TODO: calculate pay_total not here in the
61 template but rather in the mod_perl, and only
62 proceed when that number is positive %]
63 <strong>[% money(pay_total) %]</strong>
66 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
70 <td>[% l('First Name') %]</td>
71 <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
74 <td>[% l('Last Name') %]</td>
75 <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
78 <td>[% l('Street Address') %]</td>
79 <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
82 <td>[% l('City' )%]</td>
83 <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
86 <td>[% l('State or Province') %]</td>
87 <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
90 <td>[% l('ZIP or Postal Code') %]</td>
91 <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
94 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
96 <!-- Technically not needed since card type is derived from the CC number
101 <option value='VISA'>VISA</option>
102 <option value='MasterCard'>MasterCard</option>
103 <option value='American Express'>American Express</option>
109 <td>[% l('Credit Card #') %]</td>
110 <td><input type="text" name="number" maxlength="16" /></td>
114 <div style="position:absolute;">
115 <div style="position:relative;left:80px;">
117 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
120 [% l('Security Code') %]
123 <input type="text" size="4" maxlength="5" name="cvv2" />
127 <td>[% l('Exipration Month') %]</td>
129 <select name="expire_month">
130 <option value="01">[% l("January") %]</option>
131 <option value="02">[% l("February") %]</option>
132 <option value="03">[% l("March") %]</option>
133 <option value="04">[% l("April") %]</option>
134 <option value="05">[% l("May") %]</option>
135 <option value="06">[% l("June") %]</option>
136 <option value="07">[% l("July") %]</option>
137 <option value="08">[% l("August") %]</option>
138 <option value="09">[% l("September") %]</option>
139 <option value="10">[% l("October") %]</option>
140 <option value="11">[% l("November") %]</option>
141 <option value="12">[% l("December") %]</option>
146 <td>[% l('Expiration Year') %]</td>
148 <select name="expire_year">
149 [% year = date.format(date.now, '%Y');
151 WHILE y < year + 10; # show ten years starting now %]
152 <option value="[% y %]">[% y %]</option>
158 <td colspan='2' align="center">
159 <input type="submit" value="[% l('Submit Payment') %]" />
160 <input type="reset" value="[% l('Cancel') %]"
161 onclick="location.history.go(-1);" />
164 [% INCLUDE "default/opac/myopac/main_refund_policy.tt2" %]