Bugzilla – Attachment 88795 Details for
Bug 22284
Add ability to define groups of locations for hold pickup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22284: Add new checkbox in Library Groups
Bug-22284-Add-new-checkbox-in-Library-Groups.patch (text/plain), 8.48 KB, created by
Agustín Moyano
on 2019-04-25 16:30:59 UTC
(
hide
)
Description:
Bug 22284: Add new checkbox in Library Groups
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2019-04-25 16:30:59 UTC
Size:
8.48 KB
patch
obsolete
>From 42f4c26ff4fb7b25a95dcaedc066e25890fe3de3 Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >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 >--- > 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 > </label> > </p> >+ <p> >+ <label> >+ <input type="checkbox" name="ft_local_hold_group" id="add-group-modal-ft_local_hold_group" value="1" /> >+ Is local hold group >+ </label> >+ </p> > </div> > </div> > </div> >@@ -178,6 +184,12 @@ > Use for staff search groups > </label> > </p> >+ <p> >+ <label> >+ <input type="checkbox" id="edit-group-modal-ft_local_hold_group" name="ft_local_hold_group" value="1" /> >+ Is local hold group >+ </label> >+ </p> > </div> > </div> > </div> >@@ -257,7 +269,8 @@ > var ft_hide_patron_info = $(this).data('groupFt_hide_patron_info'); > var ft_search_groups_opac = $(this).data('groupFt_search_groups_opac'); > var ft_search_groups_staff = $(this).data('groupFt_search_groups_staff'); >- edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff ); >+ var ft_local_hold_group = $(this).data('groupFt_local_hold_group'); >+ edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ); > }); > > $('.delete-group').on('click', function(e) { >@@ -292,6 +305,7 @@ > $('#add-group-modal-ft_hide_patron_info').prop('checked', false); > $('#add-group-modal-ft_search_groups_opac').prop('checked', false); > $('#add-group-modal-ft_search_groups_staff').prop('checked', false); >+ $('#add-group-modal-ft_local_hold_group').prop('checked', false); > if ( parent_id ) { > $('#root-group-features-add').hide(); > } else { >@@ -301,7 +315,7 @@ > > } > >- function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff ) { >+ function edit_group( id, parent_id, title, description, ft_hide_patron_info, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group ) { > $('#edit-group-modal-id').val( id ); > $('#edit-group-modal-title').val( title ); > $('#edit-group-modal-description').val( description ); >@@ -310,11 +324,13 @@ > $('#edit-group-modal-ft_hide_patron_info').prop('checked', false); > $('#edit-group-modal-ft_search_groups_opac').prop('checked', false); > $('#edit-group-modal-ft_search_groups_staff').prop('checked', false); >+ $('#edit-group-modal-ft_local_hold_group').prop('checked', false); > $('#root-group-features-edit').hide(); > } else { > $('#edit-group-modal-ft_hide_patron_info').prop('checked', ft_hide_patron_info ? true : false ); > $('#edit-group-modal-ft_search_groups_opac').prop('checked', ft_search_groups_opac ? true : false ); > $('#edit-group-modal-ft_search_groups_staff').prop('checked', ft_search_groups_staff ? true : false ); >+ $('#edit-group-modal-ft_local_hold_group').prop('checked', ft_local_hold_group ? true : false ); > $('#root-group-features-edit').show(); > } > >@@ -367,6 +383,9 @@ > [% IF group.ft_search_groups_staff %] > <li>Use for staff search groups</li> > [% END %] >+ [% IF group.ft_local_hold_group %] >+ <li>Is local hold group</li> >+ [% END %] > </ul> > [% END %] > </td> >@@ -384,7 +403,7 @@ > </li> > > <li> >- <a class="edit-group" id="edit-group-[% group.id | html %]" href="#" data-group-id="[% group.id | html %]" data-group-parent-id="[% group.parent_id | html %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]" data-group-ft_hide_patron_info="[% group.ft_hide_patron_info | html %]" data-group-ft_search_groups_opac="[% group.ft_search_groups_opac | html %]" data-group-ft_search_groups_staff="[% group.ft_search_groups_staff | html %]" > >+ <a class="edit-group" id="edit-group-[% group.id | html %]" href="#" data-group-id="[% group.id | html %]" data-group-parent-id="[% group.parent_id | html %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]" data-group-ft_hide_patron_info="[% group.ft_hide_patron_info | html %]" data-group-ft_search_groups_opac="[% group.ft_search_groups_opac | html %]" data-group-ft_search_groups_staff="[% group.ft_search_groups_staff | html %]" data-group-ft_local_hold_group="[% group.ft_local_hold_group | html %]" > > <i class="fa fa-pencil"></i> Edit > </a> > </li> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22284
:
88138
|
88139
|
88140
|
88141
|
88142
|
88143
|
88144
|
88145
|
88369
|
88561
|
88793
|
88794
|
88795
|
88796
|
88797
|
88798
|
88799
|
88800
|
88801
|
88802
|
88939
|
88940
|
88941
|
88942
|
88943
|
88944
|
88945
|
88946
|
88947
|
88948
|
88949
|
88955
|
88956
|
88957
|
88958
|
88959
|
88960
|
88961
|
88962
|
88963
|
88964
|
88965
|
89060
|
89061
|
89062
|
89063
|
89064
|
89065
|
89066
|
89067
|
89068
|
89069
|
89070
|
89071
|
89072
|
89073
|
89074
|
89075
|
89076
|
89077
|
89078
|
89079
|
89080
|
89081
|
89082
|
89083
|
89084
|
89085
|
89122
|
89123
|
89124
|
89125
|
89126
|
89127
|
89128
|
89129
|
89130
|
89131
|
89132
|
89133
|
89134
|
89135
|
89523
|
89836
|
89837
|
89838
|
89839
|
89840
|
89841
|
89842
|
89843
|
89844
|
89845
|
89846
|
89847
|
89848
|
89849
|
90133
|
90134
|
90197
|
90198
|
90199
|
90200
|
90201
|
90469
|
90525
|
91261
|
91262
|
91263
|
91264
|
91265
|
91266
|
91267
|
91268
|
91269
|
91270
|
91271
|
91272
|
91273
|
91274
|
91275
|
91276
|
91277
|
91278
|
91279
|
91280
|
91282
|
91701
|
91702
|
91703
|
91704
|
91705
|
91706
|
91707
|
91708
|
91709
|
91710
|
91711
|
91712
|
91713
|
91714
|
91715
|
91716
|
91717
|
91718
|
91719
|
91720
|
91721
|
91750
|
91751
|
91752
|
91753
|
91754
|
91755
|
91756
|
91757
|
91758
|
92554
|
92555
|
92556
|
92557
|
92558
|
92559
|
92560
|
92561
|
92562
|
92563
|
92564
|
92565
|
92566
|
92567
|
92568
|
92569
|
92570
|
92571
|
92572
|
92573
|
92574
|
92752
|
92753
|
92754
|
92755
|
92756
|
92757
|
92758
|
92759
|
92760
|
92761
|
92762
|
92763
|
92764
|
92849
|
92850
|
92851
|
92852
|
92853
|
92854
|
92855
|
92856
|
92857
|
92858
|
92859
|
92860
|
92861
|
94483
|
94484
|
94485
|
94486
|
94487
|
94488
|
94489
|
94490
|
94491
|
94492
|
94493
|
94494
|
94495
|
96437
|
96438
|
96439
|
96440
|
96441
|
96442
|
96443
|
96444
|
96445
|
96446
|
96447
|
96448
|
96449
|
96450
|
96544
|
96545
|
96546
|
96547
|
96548
|
96549
|
96550
|
96551
|
96552
|
96553
|
96554
|
96555
|
96556
|
96557
|
96558
|
115202