From 2bd64b0bf613dc650d7a3155aa971a8dc379b4ab Mon Sep 17 00:00:00 2001
From: Agustin Moyano
Date: Sun, 24 Mar 2019 22:56:06 -0300
Subject: [PATCH] Bug 22284: Add new checkbox in Library Groups
This patch adds a new checkbox option 'Is local hold group' when you create a new root group.
To test:
1) In intranet go to Library Groups in admin module
2) Add new root group
3) Check that there is no 'Is local hold group' checkbox
4) Apply this patch
5) Add new root group
SUCCESS => a new 'Is local hold group' checkbox appears
6) Select 'Is local hold group' and save
7) Click edit button for root group
SUCCESS => 'Is local hold group' is checked
8) Sign off
Sponsored-by: VOKAL
Signed-off-by: Tomas Cohen Arazi
---
admin/library_groups.pl | 4 ++++
.../prog/en/modules/admin/library_groups.tt | 25 +++++++++++++++++++---
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/admin/library_groups.pl b/admin/library_groups.pl
index 4c5ce25b4e..f8b2574cda 100755
--- a/admin/library_groups.pl
+++ b/admin/library_groups.pl
@@ -50,6 +50,7 @@ if ( $action eq 'add' ) {
my $ft_hide_patron_info = $cgi->param('ft_hide_patron_info') || 0;
my $ft_search_groups_opac = $cgi->param('ft_search_groups_opac') || 0;
my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
+ my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
if ( !$branchcode && Koha::Library::Groups->search( { title => $title } )->count() ) {
$template->param( error_duplicate_title => $title );
@@ -63,6 +64,7 @@ if ( $action eq 'add' ) {
ft_hide_patron_info => $ft_hide_patron_info,
ft_search_groups_opac => $ft_search_groups_opac,
ft_search_groups_staff => $ft_search_groups_staff,
+ ft_local_hold_group => $ft_local_hold_group,
branchcode => $branchcode,
}
)->store();
@@ -77,6 +79,7 @@ elsif ( $action eq 'edit' ) {
my $ft_hide_patron_info = $cgi->param('ft_hide_patron_info') || 0;
my $ft_search_groups_opac = $cgi->param('ft_search_groups_opac') || 0;
my $ft_search_groups_staff = $cgi->param('ft_search_groups_staff') || 0;
+ my $ft_local_hold_group = $cgi->param('ft_local_hold_group') || 0;
if ($id) {
my $group = Koha::Library::Groups->find($id);
@@ -88,6 +91,7 @@ elsif ( $action eq 'edit' ) {
ft_hide_patron_info => $ft_hide_patron_info,
ft_search_groups_opac => $ft_search_groups_opac,
ft_search_groups_staff => $ft_search_groups_staff,
+ ft_local_hold_group => $ft_local_hold_group,
}
)->store();
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt
index d8981cf1fe..c4d1a83813 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt
@@ -121,6 +121,12 @@
Use for staff search groups
+
+
+
@@ -178,6 +184,12 @@
Use for staff search groups
+