]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/myopac/generic_payment_form.tt2
LP1774892 stripe elements
[working/Evergreen.git] / Open-ILS / src / templates / opac / myopac / generic_payment_form.tt2
1 <form method="post" id="payment_form" action='#payment'>
2     <input type="hidden" name="last_chance" value="1" />
3     [% FOR xact IN CGI.param('xact') %]
4     <input type="hidden" name="xact" value="[% xact | html %]" />
5     [% END %]
6     [% FOR xact IN CGI.param('xact_misc') %]
7     <input type="hidden" name="xact_misc" value="[% xact | html %]" />
8     [% END %]
9
10      <table id="billing_info_table">
11       <tbody>
12           <tr>
13               <td colspan='2' class="cc_header"><strong>[% l('Billing Information') %]</strong></td>
14            </tr>
15            <tr> 
16             <td><label for="payment-first-name">[% l('First Name') %]</label></td>
17                 <td><input type="text"  name="billing_first" id="payment-first-name" 
18                     value="[% ctx.user.first_given_name | html %]" /></td>
19             </tr>
20             <tr>
21                 <td><label for="payment-last-name">[% l('Last Name') %]</label></td>
22                 <td><input type="text" name="billing_last" id="payment-last-name" 
23                     value="[% ctx.user.family_name | html %]" /></td>
24             </tr>
25
26             <tr>
27                 <td><label for="payment-email-addr">[% l('Email Address') %]</label></td>
28                 <td>
29                     
30                     <input id="payment-email-addr" type="text" 
31                          value="[% ctx.user.email | html %]" disabled="disabled" 
32                         readonly="readonly" />   
33                     <a title="[% l('Update Email Address') %]"
34                         href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
35                 </td>
36             </tr>
37             <tr>
38                 <td><label for="payment-billing-address">[% l('Street Address') %]</label></td>
39                 <td><input type="text" name="billing_address" id="payment-billing-address" 
40                     value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
41             </tr>
42             <tr>
43                 <td><label for="payment-billing-city">[% l('City' )%]</label></td>
44                 <td><input type="text" name="billing_city" id="payment-billing-city" 
45                     value="[% ctx.user.billing_address.city | html %]" /></td>
46             </tr>
47             <tr>
48                 <td><label for="payment-billing-state">[% l('State or Province') %]</label></td>
49                 <td><input type="text" name="billing_state" id="payment-billing-state"
50                     value="[% ctx.user.billing_address.state | html %]" /></td>
51             </tr>
52             <tr>
53                 <td><label for="paymenet-billing-zip">[% l('ZIP or Postal Code') %]</label></td>
54                 [% USE zip=String(ctx.user.billing_address.post_code) %]
55                 <td><input type="tel" pattern="[0-9]*" maxlength="5" size="5" name="billing_zip" id="paymenet-billing-zip"
56                     value="[% zip.truncate(5)  %]" /></td>
57             </tr>
58            </tbody>
59            </table>
60            
61            <table id="credit_card_info_table">
62            <tbody>
63             <tr>
64               <td colspan='2' class="cc_header"><strong>[% l('Credit Card Information') %]</strong></td>
65             </tr>
66             <tr>
67                 <td><label for="payment-credit-card">[% l('Credit Card #') %]</label></td>
68                 
69                  <!-- Make type tel, which prompts for numbers in mobile -->
70                 <td><input type="tel" pattern="[0-9]*" maxlength="16" id="payment-credit-card" required name="number"/></td>
71             </tr>
72             <tr>
73                 <td><label for="payment-security-code">[% l('Security Code') %]</label></td>
74                 <td>
75                      <!-- Make type tel, which prompts for numbers in mobile -->
76                     <input type="tel" pattern="[0-9]*" size="4" maxlength="5" id="payment-security-code" name="cvv2"/></td>
77             </tr>
78             <tr>
79                 <td><label for="payment-expire-month">[% l('Expiration Month') %]</label></td>
80                 <td>
81                     <select id="payment-expire-month" required name="expire_month">
82                         <option value="-1"></option>
83                         <option value="01">[% l("January (1)") %]</option>
84                         <option value="02">[% l("February (2)") %]</option>
85                         <option value="03">[% l("March (3)") %]</option>
86                         <option value="04">[% l("April (4)") %]</option>
87                         <option value="05">[% l("May (5)") %]</option>
88                         <option value="06">[% l("June (6)") %]</option>
89                         <option value="07">[% l("July (7)") %]</option>
90                         <option value="08">[% l("August (8)") %]</option>
91                         <option value="09">[% l("September (9)") %]</option>
92                         <option value="10">[% l("October (10)") %]</option>
93                         <option value="11">[% l("November (11)") %]</option>
94                         <option value="12">[% l("December (12)") %]</option>
95                     </select>
96                 </td>
97             </tr>
98             <tr>
99                 <td><label for="payment-expire-year">[% l('Expiration Year') %]</label></td>
100                 <td>
101                     <select id="payment-expire-year" name="expire_year">
102                     [% year = date.format(date.now, '%Y');
103                     y = year;
104                     WHILE y < year + 10; # show ten years starting now %]
105                         <option value="[% y %]">[% y %]</option>
106                     [% y = y + 1; END %]
107                     </select>
108                 </td>
109             </tr>
110             <tr>
111                <td colspan='2'>
112                    <div id="payment_actions">
113                       [% l('Total amount:') %]
114                        <strong>[% money(ctx.fines.balance_owed) %]</strong><br />
115       
116                      <input type="submit" id="payment_submit" value="[% l('Next') %]" class="opac-button" />
117                      <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]" class="opac-button">[% l('Cancel') %]</a> 
118                      <br/>
119                      
120                       
121                    </div>
122                </td>
123             </tr>
124             
125       </tbody>
126     </table>
127 </form>
128 <table width="100%">[% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]</table>