Bugzilla – Attachment 96121 Details for
Bug 24194
Add system preference to disable the use of expiration dates for holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24194: Add HideReserveExpiration system preference to hide expiration date options for reserves
Bug-24194-Add-HideReserveExpiration-system-prefere.patch (text/plain), 7.85 KB, created by
ByWater Sandboxes
on 2019-12-09 21:41:41 UTC
(
hide
)
Description:
Bug 24194: Add HideReserveExpiration system preference to hide expiration date options for reserves
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2019-12-09 21:41:41 UTC
Size:
7.85 KB
patch
obsolete
>From 4cd46f8100223ef65146c4069792830faa6c6150 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 9 Dec 2019 04:33:42 +0000 >Subject: [PATCH] Bug 24194: Add HideReserveExpiration system preference to > hide expiration date options for reserves > >To test: >1) Update database >2) Go to place a hold on any biblio in the staff intranet and confirm >you can see the 'Hold expires on date' field. >3) In another tab, go to place a hold on any biblio in the OPAC and >confirm you can see the 'Hold not needed after' field as an option. >4) In a third tab, open the intranet and set HideReserveExpiration system preference to 'Hide' >5) Refresh the hold request page in the intranet. Confirm the expiration >date field disappears. >6) Refresh the hold request page in the OPAC. Confirm the expiration >date field disappears. > >Sponsored-by: Horowhenua Library Trust > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > .../wr325354-add-HideReserveExpiration-syspref.perl | 7 +++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/circulation.pref | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 14 ++++++++------ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 12 +++++++----- > 5 files changed, 29 insertions(+), 11 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/wr325354-add-HideReserveExpiration-syspref.perl > >diff --git a/installer/data/mysql/atomicupdate/wr325354-add-HideReserveExpiration-syspref.perl b/installer/data/mysql/atomicupdate/wr325354-add-HideReserveExpiration-syspref.perl >new file mode 100644 >index 0000000000..67451656ae >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/wr325354-add-HideReserveExpiration-syspref.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ( "HideReserveExpiration", 0, NULL, "Hide expiration date in reserves module.", "YesNo" ) }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (WR325354 - HideReserveExpiration system preference)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 9fc3d5821e..fb463e74fd 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -209,6 +209,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('GoogleOpenIDConnectDomain', '', NULL, 'Restrict Google OpenID Connect to this domain (or subdomains of this domain). Leave blank for all Google domains', 'Free'), > ('hidelostitems','0','','If ON, disables display of\"lost\" items in OPAC.','YesNo'), > ('HidePatronName','0','','If this is switched on, patron\'s cardnumber will be shown instead of their name on the holds and catalog screens','YesNo'), >+('HideReserveExpiration', 0, NULL, 'Hide expiration date in reserves module.', 'YesNo'), > ('hide_marc','0',NULL,'If ON, disables display of MARC fields, subfield codes & indicators (still shows data)','YesNo'), > ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'), > ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index e949eac982..1d6008f110 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -157,6 +157,12 @@ Circulation: > yes: Allow > no: "Don't allow" > - patrons to submit notes about checked out items. >+ - >+ - pref: HideReserveExpiration >+ choices: >+ yes: Hide >+ no: "Don't hide" >+ - expiration date options for reserves. > > Checkout Policy: > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 43c0f2aa84..a0246c047a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -451,12 +451,14 @@ > </li> > [% END %] > >- <li> >- <label for="to">Hold expires on date:</label> >- <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" /> >- <input type="hidden" class="datepickerto_hidden" /> >- <a href="#" id="clear-date-to" class="clear-date">Clear date</a> >- </li> >+ [% IF !Koha.Preference('HideReserveExpiration') %] >+ <li> >+ <label for="to">Hold expires on date:</label> >+ <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" /> >+ <input type="hidden" class="datepickerto_hidden" /> >+ <a href="#" id="clear-date-to" class="clear-date">Clear date</a> >+ </li> >+ [% END %] > > [% UNLESS ( multi_hold ) %] > <li> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 17fca3c1e2..1bc779202d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -267,11 +267,13 @@ > </li> > [% END %] > >- <li> >- <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> >- <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="holddateto" /> >- <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >- </li> >+ [% IF !Koha.Preference('HideReserveExpiration') %] >+ <li> >+ <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> >+ <input type="text" name="expiration_date_[% bibitemloo.biblionumber | html %]" id="to[% bibitemloo.biblionumber | html %]" size="10" class="holddateto" /> >+ <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >+ </li> >+ [% END %] > > [% IF Koha.Preference('AllowHoldItemTypeSelection') %] > [% itemtypes = [] %] >-- >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 24194
:
96120
|
96121
|
98048
|
98368
|
100927
|
110082
|
110127
|
111443
|
113284
|
113285
|
116626
|
116627
|
117016
|
117085
|
117089
|
117097
|
117098
|
117099
|
117100
|
117101
|
118258
|
118259
|
118260
|
118261
|
118262
|
118263
|
128301
|
128302
|
128303
|
128304
|
128305
|
128306
|
128307
|
128308
|
140646
|
140647
|
144076
|
147527
|
147528
|
150799
|
150800
|
159060
|
159061
|
167796
|
167797
|
169174
|
174650
|
174651
|
174652