Merge branch 'bug_8054' into 3.12-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / pay.tt
index 591f92e..e575df8 100644 (file)
@@ -1,15 +1,19 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Pay Fines for  [% borrower.firstname %] [% borrower.surname %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
 <script type= "text/javascript">
 //<![CDATA[
     $(document).ready(function(){
+ $('#pay-fines-form').preventDoubleFormSubmit();
         $("#woall").click(function(event){
             var answer = confirm(_("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!"));
                 if (!answer){
                     event.preventDefault();
                 }
         });
+        $('#CheckAll').click(function(){ $("#finest").checkCheckboxes(); return false;});
+        $('#CheckNone').click(function(){ $("#finest").unCheckCheckboxes(); return false;});
     });
 //]]>
 </script>
 [% INCLUDE 'members-toolbar.inc' borrowernumber=borrower.borrowernumber %]
 
 <!-- The manual invoice and credit buttons -->
-<div class="toptabs">
-<ul class="ui-tabs-nav">
+<div class="statictabs">
+<ul>
        <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Account</a></li>
-       <li class="ui-tabs-selected"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
+    <li class="active"><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]" >Pay fines</a></li>
        <li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual invoice</a></li>
        <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% borrower.borrowernumber %]" >Create manual credit</a></li>
 </ul>
 <div class="tabs-container">
 
 [% IF ( accounts ) %]
-    <form action="/cgi-bin/koha/members/pay.pl" method="post">
+    <form action="/cgi-bin/koha/members/pay.pl" method="post" id="pay-fines-form">
        <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
-
-<table>
+<p><span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></p>
+<table id="finest">
 <thead>
 <tr>
+    <th>&nbsp;</th>
     <th>Fines &amp; charges</th>
-    <th>Sel</th>
        <th>Description</th>
     <th>Account type</th>
        <th>Notify id</th>
 [% FOREACH account_grp IN accounts %]
     [% FOREACH line IN account_grp.accountlines %]
 <tr>
+    <td>
+    [% IF ( line.amountoutstanding > 0 ) %]
+        <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
+    [% END %]
+    </td>
     <td>
     [% IF ( line.amountoutstanding > 0 ) %]
         <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
@@ -73,6 +82,7 @@
     <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
     <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
     <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
+    <input type="hidden" name="accountlines_id[% line.accountno %]" value="[% line.accountlines_id %]" />
     <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
     <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
     <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
     <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
     <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
     </td>
-    <td>
-    [% IF ( line.amountoutstanding > 0 ) %]
-        <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
-    [% END %]
-    </td>
-    <td>[% line.description %] [% line.title |html_entity %]</td>
+    <td>[% line.description %] ([% line.title |html_entity %])</td>
     <td>[% line.accounttype %]</td>
     <td>[% line.notify_id %]</td>
     <td>[% line.notify_level %]</td>