Bug 26799: Remove the use of jquery.checkboxes plugin from patron payment page

This patch removes the use of the jquery.checkboxes plugin from the
patron payment screen (members/pay.tt).

To test, apply the patch and locate a patron with unpaid fines.

- View the "Accounting" page for that patron.
- In the table of outstanding fines, test the "Select all" and "Clear
  all" links work correctly to check the checkboxes corresponding to
  each fine.
- Confirm that the "Select all" action enables the "Pay selected" and
  "Write off selected" buttons.
- Confirm that the "Clear all" action disables the "Pay selected" and
  "Write off selected" buttons.

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2020-10-23 13:54:01 +00:00 committed by Jonathan Druart
parent 296189dc6c
commit 689f1f9b1f

View file

@ -172,7 +172,6 @@
[% MACRO jsinclude BLOCK %] [% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %] [% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %] [% Asset.js("js/members-menu.js") | $raw %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
[% INCLUDE 'datatables.inc' %] [% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'columns_settings.inc' %]
<script> <script>
@ -200,15 +199,17 @@
}); });
$('#CheckAll').click(function(e){ $('#CheckAll').click(function(e){
e.preventDefault(); e.preventDefault();
$("#finest").checkCheckboxes(); $(".cb").each(function(){
$(this).prop("checked", true );
});
enableCheckboxActions(); enableCheckboxActions();
return false;
}); });
$('#CheckNone').click(function(e){ $('#CheckNone').click(function(e){
e.preventDefault(); e.preventDefault();
$("#finest").unCheckCheckboxes(); $(".cb").each(function(){
$(this).prop("checked", false );
});
enableCheckboxActions(); enableCheckboxActions();
return false;
}); });
$(".cb").change(function(){ $(".cb").change(function(){
enableCheckboxActions(); enableCheckboxActions();