From 6c0e6fa2f9de64c36f4196f062435d090a366d1d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 7 Nov 2017 15:29:56 +0100 Subject: [PATCH] Bug 19584: Check compare barcodes box when uploading barcodes This patch makes two trivial changes in the inventory interface: [1] If you have uploaded a barcode file, the compare barcodes checkbox is automatically checked. In most cases this will be the option the user wants. The compare will report missed items on the shelf. [2] If the compare barcodes checkbox is checked, the Skip items on loan- checkbox is automatically checked. This again is often desirable. If you compare, you normally are not interested in seeing items reported missing while they are checked out. Test plan: [1] Upload a barcode file on inventory. Is the compare checked? [2] Toggle compare. Does 'skip items on loan' change accordingly? Signed-off-by: Marcel de Rooy Signed-off-by: Grace Smyth --- .../prog/en/modules/tools/inventory.tt | 136 +++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 4b09243..3996535 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -5,6 +5,137 @@ Koha › Tools › Inventory [% INCLUDE 'doc-head-close.inc' %] +<<<<<<< HEAD +======= +[% INCLUDE 'datatables.inc' %] +[% INCLUDE 'calendar.inc' %] + + +>>>>>>> Bug 19584: Check compare barcodes box when uploading barcodes @@ -347,11 +478,14 @@ if( $("#uploadbarcodes").val() ) { $("#setdate").prop('disabled',false); $("#compareinv2barcd").prop('disabled',false); + $("#compareinv2barcd").attr('checked',true); // default $("#dont_checkin").prop('disabled',false); if( $("#compareinv2barcd").attr('checked') ) { $("fieldset#optionalfilters").show(); + $("#ignoreissued").attr('checked',true); // default } else { $("fieldset#optionalfilters").hide(); + $("#ignoreissued").attr('checked',false); } } else { $("#setdate").prop('disabled',true); @@ -365,7 +499,9 @@ $("#compareinv2barcd").click(function() { if( $("#compareinv2barcd").attr('checked') ) { $("fieldset#optionalfilters").show(); + $("#ignoreissued").attr('checked',true); // default } else { + $("#ignoreissued").attr('checked',false); $("fieldset#optionalfilters").hide(); } }); -- 2.1.4