5 [% USE AuthorisedValues %]
7 [% SET ENABLE_OPAC_PAYMENTS = Koha.Preference('EnablePayPalOpacPayments') || plugins %]
8 [% SET DISPLAY_PAYMENT_BLOCK = 0 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your fines and charges</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% BLOCK cssinclude %]
13 [% Asset.css("css/datatables.css") | $raw %]
17 [% INCLUDE 'bodytag.inc' bodyid='opac-account' bodyclass='scrollto' %]
18 [% INCLUDE 'masthead.inc' %]
21 <ul class="breadcrumb">
22 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
23 <li>[% IF logged_in_user %]<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>[% END %] <span class="divider">›</span></li>
24 <li><a href="#">Your fines and charges</a></li>
27 <div class="container-fluid">
28 <div class="row-fluid">
31 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
35 <div id="useraccount" class="maincontent">
38 <div class="alert alert-info">
39 [% IF message == 'valid_payment' %]
40 <p>Your payment of $[% message_value | html %] has been processed successfully!</p>
41 [% ELSIF message == 'duplicate_payment' %]
42 <p>A payment with the transaction id '[% message_value | html %]' has already been posted to an account.</p>
43 <p>Please contact a librarian for details.</p>
44 [% ELSIF message == 'invalid_payment' %]
45 <p>The transaction id '[% message_value | html %]' for this payment is invalid.</p>
46 <p>Please contact a librarian for details.</p>
51 [% IF payment_error %]
52 <div id="error" class="dialog alert">
53 <p><strong>Error:</strong> there was a problem processing your payment</p>
55 [% IF payment_error == "PAYPAL_UNABLE_TO_CONNECT" %]
56 <p>Unable to connect to PayPal.</p>
57 <p>Please contact a librarian to verify your payment.</p>
58 [% ELSIF payment_error == "PAYPAL_ERROR_PROCESSING" %]
59 <p>Unable to verify payment.</p>
60 <p>Please contact a librarian to verify your payment.</p>
64 <div class="alert alert-info">
65 <p><strong>Payment applied:</strong> your payment of [% payment | html %] has been applied to your account</p>
69 [% PROCESS 'account-table.inc' ACCOUNT_LINES = ACCOUNT_LINES, ENABLE_OPAC_PAYMENTS = ENABLE_OPAC_PAYMENTS, plugins = plugins %]
71 </div> <!-- / #useraccount -->
72 </div> <!-- / .span10 -->
73 </div> <!-- / .row-fluid -->
74 </div> <!-- / .container-fluid -->
75 </div> <!-- / .main -->
77 [% INCLUDE 'opac-bottom.inc' %]
79 [% INCLUDE 'datatables.inc' %]
81 $( document ).ready(function() {
83 $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, {
85 { "type": "title-string", "targets" : [ "title-string" ] }
87 "order": [[ 0, "desc" ]]
90 $(".paypal").on("click", function() {
91 window.open('https://www.paypal.com/webapps/mpp/paypal-popup','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700');
95 $(".pay-online").removeClass("hidden");
97 $("#amount-to-pay-label").hide();
99 $(".checkbox-pay").change( function() {
100 // Disable the pay button if no fees are selected
101 $("#submit-pay").prop("disabled", ! $(".checkbox-pay:checked").length );
103 // Calculate the total amount to be paid based on selected fees
105 $(".checkbox-pay").each( function() {
106 if ( $(this).is(":checked") ) {
107 var id = this.id.split("checkbox-pay-")[1];
108 total += parseFloat( $("#amount-" + id).val() );
113 $("#amount-to-pay").html( total.toFixed(2) );
114 $("#amount-to-pay-label").show();
116 $("#amount-to-pay-label").hide();