From bba223b0717a82ecd173089ea7d336b2130cc381 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 22 Apr 2020 14:40:17 +0000 Subject: [PATCH] Bug 25250: (bug 24982 follow-up) Don't disable checkboxes if modification log If we are coming from the "Modification logs" of the patron module we should not disable the checkboxes (that are not visible). Otherwise the logs are not longer filtered and all are visible. Test plan: 0. Don't apply this patch 1. Modify a patron, add them a fine, and do a checkout 2. Click the "Modification logs" => You see the Patrons and Circulation logs 3. Click submit => You see all the logs (KO) 4. Apply this patch 5. Click the "Modification logs" => You see the Patrons and Circulation logs 6. Click submit => You see the Patrons only (KO) 7. Apply the patch from bug 25249 8. Click the "Modification logs" => You see the Patrons and Circulation logs 9. Click submit => You see the Patrons and Circulation logs (OK!) --- koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js index ccec003ade..ca7f5a3aa3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js @@ -1,18 +1,18 @@ function tickAll(section){ - $("input[name='" + section + "']").prop("checked", true); + $("input[type='checkbox'][name='" + section + "']").prop("checked", true); $("#" + section.slice(0,-1) + "ALL").prop("checked", true); - $("input[name='" + section + "']").prop("disabled", true); + $("input[type='checkbox'][name='" + section + "']").prop("disabled", true); $("#" + section.slice(0,-1) + "ALL").prop("disabled", false); } function untickAll(section){ - $("input[name='" + section + "']").prop("checked", false); - $("input[name='" + section + "']").prop("disabled", false); + $("input[type='checkbox'][name='" + section + "']").prop("checked", false); + $("input[type='checkbox'][name='" + section + "']").prop("disabled", false); } $(document).ready(function(){ - if ( $('input[name="modules"]:checked').length == 0 ) { + if ( $('input[type="checkbox"][name="modules"]:checked').length == 0 ) { tickAll('modules'); } $("#moduleALL").change(function(){ @@ -22,7 +22,7 @@ $(document).ready(function(){ untickAll('modules'); } }); - $("input[name='modules']").change(function(){ + $("input[type='checkbox'][name='modules']").change(function(){ if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){ tickAll('modules'); } -- 2.20.1