From 32ea4f489c682852e25cdd32d9ef1630f6a336f0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize 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. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- opac/opac-reserve.pl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 7b1e9d3708a..335589658e3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -287,7 +287,7 @@ [% IF ( reserve_in_future ) %]
  • - + [% INCLUDE 'date-format.inc' %]
  • diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index fb1fcfe3459..4ccdbaa1845 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; @@ -623,6 +624,7 @@ if ( ) { $template->param( reserve_in_future => 1, + today => dt_from_string, ); } -- 2.43.0