From 7f71838a0edce391aafc35dd60f87afdcff4b9e2 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 28 Mar 2024 11:26:58 +0000 Subject: [PATCH] Bug 34597: Add 'ill_request' to patron category admin page --- Koha/Patron/Category.pm | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt | 5 +++++ koha-tmpl/intranet-tmpl/prog/js/categories.js | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm index 6d9841dd669..8307c1faee0 100644 --- a/Koha/Patron/Category.pm +++ b/Koha/Patron/Category.pm @@ -46,7 +46,7 @@ Return if the provided action is blocked by BlockExpiredPatronOpacActions, accou =item action -Action, can be one of: ['hold', 'renew'] +Action, can be one of: ['hold', 'renew', 'ill_request'] =back @@ -74,7 +74,7 @@ Return if the provided action is blocked by this category's BlockExpiredPatronOp =item action -Action, can be one of: ['hold', 'renew'] +Action, can be one of: ['hold', 'renew', 'ill_request'] =back diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt index 215f41dba3e..d1285f6d5b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -361,6 +361,11 @@ [% ELSE %] [% END %] + [% IF category and category.BlockExpiredPatronOpacActions_contains('ill_request') %] + + [% ELSE %] + + [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/js/categories.js b/koha-tmpl/intranet-tmpl/prog/js/categories.js index 615e5554f74..65ec948afd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/categories.js +++ b/koha-tmpl/intranet-tmpl/prog/js/categories.js @@ -133,6 +133,7 @@ $(document).ready(function () { ) { blocked_actions_select.multipleSelect("uncheck", "hold"); blocked_actions_select.multipleSelect("uncheck", "renew"); + blocked_actions_select.multipleSelect("uncheck", "ill_request"); } else if ( view.value != "follow_syspref_BlockExpiredPatronOpacActions" && view.selected -- 2.39.2