Bugzilla – Attachment 140742 Details for
Bug 31519
Unused template parameters in request.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31519: Move preference fetching directly to be done in the template
Bug-31519-Move-preference-fetching-directly-to-be-.patch (text/plain), 2.21 KB, created by
David Nind
on 2022-09-18 21:27:52 UTC
(
hide
)
Description:
Bug 31519: Move preference fetching directly to be done in the template
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-18 21:27:52 UTC
Size:
2.21 KB
patch
obsolete
>From 747970e755371b174b86e88f8eb9144b309e0984 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Sun, 4 Sep 2022 10:46:16 +0300 >Subject: [PATCH] Bug 31519: Move preference fetching directly to be done in > the template > >Since we are not in a loop or using this multiple times it's simple to >do it this way, helps with changing the template code in the future >too since if we want to remove this syspref variable we know it is >only used in this one particular place. > >To test: > 1) Grep for reserve_in_future and make sure there are no matches > after applying this patch > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- > reserve/request.pl | 4 ---- > 2 files changed, 1 insertion(+), 5 deletions(-) > >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 eb37dbc00e..d4818aa865 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -581,7 +581,7 @@ > [% END %] > [% END # /UNLESS multi_hold %] > >- [% IF ( reserve_in_future ) %] >+ [% IF ( Koha.Preference('AllowHoldDateInFuture') ) %] > <li> > <label for="from">Hold starts on date:</label> > <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" /> >diff --git a/reserve/request.pl b/reserve/request.pl >index a15bc53bcc..6264b78a45 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -713,10 +713,6 @@ $template->param( > # pass the userenv branch if no pickup location selected > $template->param( pickup => $pickup || C4::Context->userenv->{branch} ); > >-if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { >- $template->param( reserve_in_future => 1 ); >-} >- > $template->param(borrowernumber => $borrowernumber_hold); > > # printout the page >-- >2.30.2
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 31519
:
140199
|
140200
|
140741
|
140742
|
141534
|
141535