From fc1b4fc90d840d352f04378e7c88cd1a674fa088 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 25 Apr 2023 15:07:29 +0000 Subject: [PATCH] Bug 32914: (follow-up) Improve handling of list tab visibility This patch makes minor changes to the way this page handles switching between authority and bibliographic record batch operation in order to ensure that the list tab is correctly shown or hidden and that the list tab selection isn't transmitted when an authority batch is submitted. This patch also changes the labels on the "record type" fields to fix the incorrect use of the abbreviated "biblios" in favor of "Bibliographic." To test, apply the patch and go to Cataloging -> Batch record modification - With the "Bibliographic records" selected, click the "Select a list of records" tab." - Select the "Authority records" radio button. - The "Select a list of records" tab should disappear, and the "Upload a file" tab should now be selected." - Select the "Bibliographic records radio button. - The "Select a list of records" tab should reappear, and the "Upload a file" tab should be selected. - Test all combinations of form submissions to confirm that each works correctly: - Bibliographic records by upload, list, and biblionumber entry - Authory records by upload and authority record number entry Signed-off-by: Philip Orr --- .../modules/tools/batch_record_modification.tt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt index fbd0b03a78..a0b63de331 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt @@ -73,9 +73,9 @@
Record type -
    -
  1. -
  2. +
      +
    1. +
@@ -290,8 +290,10 @@ $("input[type='radio']").click(function() { if ($(this).attr('id') == 'authority_type') { $("a[href='#shelves_tab_panel']").parent().hide(); + $("a[href='#uploadfile_tab_panel']").tab("show"); } else if ($(this).attr('id') == 'biblio_type') { $("a[href='#shelves_tab_panel']").parent().show(); + $("a[href='#uploadfile_tab_panel']").tab("show"); } }); @@ -346,14 +348,11 @@ $("#record_ids_selection").on("submit", function(e) { var tab = $(this).find('#batch_mod_form li.active:first a').attr('href'); if (tab == '#uploadfile_tab_panel') { - $("#shelf_number").empty(''); - $("#recordnumber_list").val(''); + $("#recordnumber_list, #shelf_number").val(''); } else if (tab == '#shelves_tab_panel') { - $("#uploadfile").val('') - $("#recordnumber_list").val(''); + $("#recordnumber_list, #uploadfile").val(''); } else { // enterlist - $("#uploadfile").val('') - $("#shelf_number").empty(''); + $("#uploadfile, #shelf_number").val('') } }); -- 2.30.2