[% FOR xact IN CGI.param('xact_misc') %]
<input type="hidden" name="xact_misc" value="[% xact | html %]" />
[% END %]
+ [% IF ctx.use_stripe %]
+ <input type="hidden" name="stripe_token" id="stripe_token" />
+ [% END %]
+
+ <table id="billing_info_table" class="table table-hover">
+ <thead>
+ <th colspan='2'><strong>[% l('Billing Information') %]</strong></th>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td><label for="payment-first-name">[% l('First Name') %]</label></td>
+ <td><input name="given-name" type="text" name="billing_first" id="payment-first-name"
+ value="[% ctx.user.first_given_name | html %]" class="form-control"/></td>
+ </tr>
+ <tr>
+ <td><label for="payment-last-name">[% l('Last Name') %]</label></td>
+ <td><input name="family-name" type="text" name="billing_last" id="payment-last-name"
+ value="[% ctx.user.family_name | html %]" class="form-control"/></td>
+ </tr>
+
+ <tr>
+ <td><label for="payment-email-addr">[% l('Email Address') %]</label></td>
+ <td>
+
+ <input id="payment-email-addr" type="text"
+ value="[% ctx.user.email | html %]" disabled="disabled"
+ readonly="readonly" class="form-control" name="email"/>
+ <a title="[% l('Update Email Address') %]"
+ href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
+ </td
+ </tr>
+ <tr>
+ <td><label for="payment-billing-address">[% l('Street Address') %]</label></td>
+ <td><input type="text" name="billing_address" id="payment-billing-address"
+ value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" class="form-control"/></td>
+ </tr>
+ <tr>
+ <td><label for="payment-billing-city">[% l('City' )%]</label></td>
+ <td><input type="text" name="billing_city" id="payment-billing-city"
+ value="[% ctx.user.billing_address.city | html %]" class="form-control"/></td>
+ </tr>
+ <tr>
+ <td><label for="payment-billing-state">[% l('State or Province') %]</label></td>
+ <td><input type="text" name="billing_state" id="payment-billing-state"
+ value="[% ctx.user.billing_address.state | html %]" class="form-control" /></td>
+ </tr>
+ <tr>
+ <td><label for="paymenet-billing-zip">[% l('Postal Code') %]</label></td>
+ [% USE zip=String(ctx.user.billing_address.post_code) %]
+ <td><input type="tel" pattern="[/^[0-9]{5}(-[0-9]{4})?$/]*" maxlength="7" size="7" name="billing_zip" id="payment-billing-zip"
+ value="[% zip.truncate(5) %]" class="form-control"/></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <table id="credit_card_info_table" class="table">
+ <thead>
+ <th colspan='2'><strong>[% l('Credit Card Information') %]</strong></th>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td><label for="payment-credit-card">[% l('Credit Card #') %]</label></td>
+
+ <!-- Make type tel, which prompts for numbers in mobile -->
+ <td><input class="form-control" type="tel" pattern="[0-9]*" maxlength="16" id="payment-credit-card" required
+ [% IF ctx.use_stripe %]
+ data-stripe="number"
+ [% ELSE %]
+ name="number"
+ [% END %]
+ /></td>
+ </tr>
+ <tr>
+ <td><label for="payment-security-code">[% l('Security Code') %]</label></td>
+ <td>
+ <!-- Make type tel, which prompts for numbers in mobile -->
+ <input class="form-control" type="tel" pattern="[0-9]*" size="4" maxlength="5" id="payment-security-code"
+ [% IF ctx.use_stripe %]
+ data-stripe="cvc"
+ [% ELSE %]
+ name="cvv2"
+ [% END %]
+ /></td>
+ </tr>
+ <tr>
+ <td><label for="payment-expire-month">[% l('Expiration Month') %]</label></td>
+ <td>
+ <select class="form-control" id="payment-expire-month" required
+ [% IF ctx.use_stripe %]
+ data-stripe="exp_month"
+ [% ELSE %]
+ name="expire_month"
+ [% END %]
+ >
+ <option value="-1"></option>
+ <option value="01">[% l("January (1)") %]</option>
+ <option value="02">[% l("February (2)") %]</option>
+ <option value="03">[% l("March (3)") %]</option>
+ <option value="04">[% l("April (4)") %]</option>
+ <option value="05">[% l("May (5)") %]</option>
+ <option value="06">[% l("June (6)") %]</option>
+ <option value="07">[% l("July (7)") %]</option>
+ <option value="08">[% l("August (8)") %]</option>
+ <option value="09">[% l("September (9)") %]</option>
+ <option value="10">[% l("October (10)") %]</option>
+ <option value="11">[% l("November (11)") %]</option>
+ <option value="12">[% l("December (12)") %]</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="payment-expire-year">[% l('Expiration Year') %]</label></td>
+ <td>
+ <select class="form-control" id="payment-expire-year"
+ [%- IF ctx.use_stripe %]
+ data-stripe="exp_year"
+ [% ELSE %]
+ name="expire_year"
+ [% END -%]
+ >
+ [% year = date.format(date.now, '%Y');
+ y = year;
+ WHILE y < year + 10; # show ten years starting now %]
+ <option value="[% y %]">[% y %]</option>
+ [% y = y + 1; END %]
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'>
+ <div id="payment_actions">
+ [% l('Total amount:') %]
+ <strong>[% money(ctx.fines.balance_owed) %]</strong><br />
+
+ <button type="submit" id="payment_submit" class="btn btn-confirm"><i class="fas fa-arrow-circle-right"></i> [% l('Next') %]</button>
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]" class="btn btn-deny"><i class="fas fa-ban"></i> [% l('Cancel') %]</a>
+ <br/>
+ </div>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]
+
[% END %]
</div></div>