Bugzilla – Attachment 165535 Details for
Bug 35977
Display current date in hold starts on when placing a hold in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35977: Set holddatefrom default to today
Bug-35977-Set-holddatefrom-default-to-today.patch (text/plain), 3.15 KB, created by
Martin Renvoize (ashimema)
on 2024-04-25 12:40:13 UTC
(
hide
)
Description:
Bug 35977: Set holddatefrom default to today
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-25 12:40:13 UTC
Size:
3.15 KB
patch
obsolete
>From fa5cbae0b0aff5aa601aa29e22e557a897ccd159 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 7 Feb 2024 15:21:04 +0000 >Subject: [PATCH] Bug 35977: Set holddatefrom default to today > >This patch sets the holddatefrom date to today by default on the opac. > >Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- > opac/opac-reserve.pl | 11 ++++++----- > 2 files changed, 7 insertions(+), 6 deletions(-) > >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 bacd8b77cb5..8813367702a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -288,7 +288,7 @@ > [% IF ( reserve_in_future ) %] > <li> > <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label> >- <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" data-flatpickr-futureinclusive="true" size="10" class="flatpickr holddatefrom" /> >+ <input type="text" name="reserve_date_[% bibitemloo.biblionumber | html %]" id="from[% bibitemloo.biblionumber | html %]" data-start_for="to[% bibitemloo.biblionumber | html %]" data-flatpickr-futureinclusive="true" size="10" class="flatpickr holddatefrom" value="[% today | $raw %]" /> > <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> > <div class="required_label" style="display:none;">Required</div> > </li> >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 783b95f0277..fe1d38fbe9b 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -35,6 +35,7 @@ use C4::Overdues; > use Koha::AuthorisedValues; > use Koha::Biblios; > use Koha::CirculationRules; >+use Koha::DateUtils qw( dt_from_string ); > use Koha::Items; > use Koha::ItemTypes; > use Koha::Checkouts; >@@ -618,12 +619,12 @@ $template->param(OpacHoldNotes=>$show_notes); > # display infos > $template->param(bibitemloop => $biblioLoop); > # can set reserve date in future >-if ( >- C4::Context->preference( 'AllowHoldDateInFuture' ) && >- C4::Context->preference( 'OPACAllowHoldDateInFuture' ) >- ) { >+if ( C4::Context->preference('AllowHoldDateInFuture') >+ && C4::Context->preference('OPACAllowHoldDateInFuture') ) >+{ > $template->param( >- reserve_in_future => 1, >+ reserve_in_future => 1, >+ today => dt_from_string, > ); > } > >-- >2.44.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 35977
:
161814
|
161928
|
162125
|
162126
|
164217
|
164220
|
164221
| 165535 |
165536
|
165725
|
165910