Bugzilla – Attachment 42859 Details for
Bug 11622
Add ability to pay fees and fines from OPAC via PayPal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11622 [QA Followup] - Show amount to be paid near make payment button
Bug-11622-QA-Followup---Show-amount-to-be-paid-nea.patch (text/plain), 3.13 KB, created by
Jonathan Druart
on 2015-09-25 07:38:12 UTC
(
hide
)
Description:
Bug 11622 [QA Followup] - Show amount to be paid near make payment button
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-25 07:38:12 UTC
Size:
3.13 KB
patch
obsolete
>From 4fd5b6716f49331fc2a2b7b444494e18eaf7216a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 18 Sep 2015 05:41:27 -0700 >Subject: [PATCH] Bug 11622 [QA Followup] - Show amount to be paid near make > payment button > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 27 ++++++++++++++++++++-- > 1 file changed, 25 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index a1a660f..bf808dc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -76,6 +76,7 @@ > <td> > [% IF ACCOUNT_LINE.amountoutstanding > 0 %] > <input name="accountline" type="checkbox" class="checkbox-pay" id="checkbox-pay-[% ACCOUNT_LINE.accountlines_id %]" value="[% ACCOUNT_LINE.accountlines_id %]"> >+ <input type="hidden" id="amount-[% ACCOUNT_LINE.accountlines_id %]" value="[% ACCOUNT_LINE.amountoutstanding %]" /> > [% END %] > </td> > [% END %] >@@ -135,6 +136,9 @@ > <div class="control-group"> > <input type="hidden" id="payment-amount" name="payment_amount" value="0" /> > <button id="submit-pay" type="submit" class="btn" disabled="disabled">Make payment</button> >+ <span id="amount-to-pay-label"> >+ Amount to pay: <span id="amount-to-pay">0.00</span> >+ </span> > </div> > </fieldset> > [% END %] >@@ -152,8 +156,27 @@ > [% BLOCK jsinclude %] > <script type="text/javascript"> > $( document ).ready(function() { >- $('.checkbox-pay').change( function() { >- $("#submit-pay").prop('disabled', ! $('.checkbox-pay:checked').length ); >+ $("#amount-to-pay-label").hide(); >+ >+ $(".checkbox-pay").change( function() { >+ // Disable the pay button if no fees are selected >+ $("#submit-pay").prop("disabled", ! $(".checkbox-pay:checked").length ); >+ >+ // Calculate the total amount to be paid based on selected fees >+ var total = 0; >+ $(".checkbox-pay").each( function() { >+ if ( $(this).is(":checked") ) { >+ var id = this.id.split("checkbox-pay-")[1]; >+ total += parseFloat( $("#amount-" + id).val() ); >+ } >+ }); >+ >+ if ( total ) { >+ $("#amount-to-pay").html( total.toFixed(2) ); >+ $("#amount-to-pay-label").show(); >+ } else { >+ $("#amount-to-pay-label").hide(); >+ } > }); > }); > </script> >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11622
:
24753
|
24754
|
24756
|
40520
|
40521
|
40522
|
40523
|
42241
|
42351
|
42352
|
42594
|
42649
|
42702
|
42705
|
42715
|
42733
|
42774
|
42775
|
42777
|
42778
|
42842
|
42843
|
42857
|
42858
|
42859
|
42860
|
42861
|
42862
|
42863
|
42864
|
42865
|
44419
|
44420
|
44421
|
44422
|
44423
|
44424
|
44425
|
44426
|
44427
|
46143
|
46144
|
46145
|
46146
|
46147
|
46148
|
46149
|
46150
|
46151