Bugzilla – Attachment 165721 Details for
Bug 36341
"Hold starts on date" should be limited to future dates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36341: (follow-up) Fix missing Date_from_syspref
Bug-36341-follow-up-Fix-missing-Datefromsyspref.patch (text/plain), 1.97 KB, created by
Martin Renvoize (ashimema)
on 2024-04-29 08:40:53 UTC
(
hide
)
Description:
Bug 36341: (follow-up) Fix missing Date_from_syspref
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-29 08:40:53 UTC
Size:
1.97 KB
patch
obsolete
>From 2a9c14b4fa802484e606e184dd46e1905d16ea28 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 29 Apr 2024 09:38:02 +0100 >Subject: [PATCH] Bug 36341: (follow-up) Fix missing Date_from_syspref > >It appears this bug introduces the first actual use of this function in >the OPAC and thus exposes that bug 31261 didn't fully port the >Date_from_syspref from the intranet. >--- > .../bootstrap/en/includes/calendar.inc | 22 +++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >index f2fafa95d1d..103e03264f7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >@@ -157,6 +157,28 @@ > } > } > >+ function Date_from_syspref(dstring) { >+ var dateX = dstring.split(/[-/.]/); >+ if (debug > 1 && sentmsg < 1) { >+ sentmsg++; >+ alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n")); >+ } >+ if (dateformat_pref === "iso") { >+ return new Date(dateX[0], (dateX[1] - 1), dateX[2]); // YYYY-MM-DD to (YYYY,m(0-11),d) >+ } else if (dateformat_pref === "us") { >+ return new Date(dateX[2], (dateX[0] - 1), dateX[1]); // MM/DD/YYYY to (YYYY,m(0-11),d) >+ } else if (dateformat_pref === "metric") { >+ return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d) >+ } else if (dateformat_pref === "dmydot") { >+ return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD.MM.YYYY to (YYYY,m(0-11),d) >+ } else { >+ if (debug > 0) { >+ alert("KOHA ERROR - Unrecognized date format: " + dateformat_pref); >+ } >+ return 0; >+ } >+ } >+ > $(document).ready(function(){ > $(".flatpickr").each(function(){ > let options = {}; >-- >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 36341
:
163309
|
164218
|
164219
| 165721