View | Details | Raw Unified | Return to bug 9943
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-6 / +26 lines)
Lines 4-9 Link Here
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
5
<script type= "text/javascript">
5
<script type= "text/javascript">
6
//<![CDATA[
6
//<![CDATA[
7
function enableCheckboxActions(){
8
    // Enable/disable controls if checkboxes are checked
9
    var checkedBoxes = $("input.cb:checked");
10
    if ($(checkedBoxes).size()) {
11
      $("#payselected").prop("disabled",false);
12
    } else {
13
      $("#payselected").prop("disabled",true);
14
    }
15
}
7
    $(document).ready(function(){
16
    $(document).ready(function(){
8
 $('#pay-fines-form').preventDoubleFormSubmit();
17
 $('#pay-fines-form').preventDoubleFormSubmit();
9
        $("#woall").click(function(event){
18
        $("#woall").click(function(event){
Lines 12-19 Link Here
12
                    event.preventDefault();
21
                    event.preventDefault();
13
                }
22
                }
14
        });
23
        });
15
        $('#CheckAll').click(function(){ $("#finest").checkCheckboxes(); return false;});
24
        $('#CheckAll').click(function(){
16
        $('#CheckNone').click(function(){ $("#finest").unCheckCheckboxes(); return false;});
25
            $("#finest").checkCheckboxes();
26
            enableCheckboxActions();
27
            return false;
28
        });
29
        $('#CheckNone').click(function(){
30
            $("#finest").unCheckCheckboxes();
31
            enableCheckboxActions();
32
            return false;
33
        });
34
        $(".cb").change(function(){
35
            enableCheckboxActions();
36
        });
37
        enableCheckboxActions();
17
    });
38
    });
18
//]]>
39
//]]>
19
</script>
40
</script>
Lines 71-77 Link Here
71
<tr>
92
<tr>
72
    <td>
93
    <td>
73
    [% IF ( line.amountoutstanding > 0 ) %]
94
    [% IF ( line.amountoutstanding > 0 ) %]
74
        <input type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
95
        <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
75
    [% END %]
96
    [% END %]
76
    </td>
97
    </td>
77
    <td>
98
    <td>
Lines 111-119 Link Here
111
</tbody>
132
</tbody>
112
</table>
133
</table>
113
<fieldset class="action">
134
<fieldset class="action">
114
<input type="submit" name="paycollect"  value="Pay amount" class="submit" />
135
<input type="submit" id="paycollect" name="paycollect"  value="Pay amount" class="submit" />
115
<input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />
136
<input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />
116
<input type="submit" name="payselected"  value="Pay selected" class="submit" />
137
<input type="submit" id="payselected" name="payselected"  value="Pay selected" class="submit" />
117
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
138
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
118
</fieldset>
139
</fieldset>
119
</form>
140
</form>
120
- 

Return to bug 9943