Bugzilla – Attachment 121784 Details for
Bug 28538
Regression - Date of birth entered without correct format causes internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28538: Insert formatted date if valid
Bug-28538-Insert-formatted-date-if-valid.patch (text/plain), 2.51 KB, created by
Andrew Fuerste-Henry
on 2021-06-10 13:20:22 UTC
(
hide
)
Description:
Bug 28538: Insert formatted date if valid
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-06-10 13:20:22 UTC
Size:
2.51 KB
patch
obsolete
>From ed4e4ee0c114d576ea509f24e9a2a8bd541a111c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 9 Jun 2021 17:59:59 +0000 >Subject: [PATCH] Bug 28538: Insert formatted date if valid > >This patch restores the setting of the date from bug 27937 and adds a parsing of the date to >ensure the correct format > >To test: >1 - Follow test plan from bug 27937 - it fails >2 - Follow test plan from bug 28351 - it succeeds >3 - Apply patch >4 - Repeat 1-2 >5 - both plans pass now > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/calendar.js | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >index 511a6b88a5..fb90add482 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >@@ -60,7 +60,7 @@ > <legend>Add manual restriction</legend> > <ol> > <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li> >- <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="10" value="" class="datepicker" type="text" /> >+ <li><label for="rexpiration">Expiration:</label> <input name="expiration" id="rexpiration" size="20" value="" class="datepicker" type="text" /> > <a href="#" class="clear-date" id="clear-date-rexpiration">Clear date</a></li> > </ol> > <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/calendar.js b/koha-tmpl/intranet-tmpl/prog/js/calendar.js >index 1f312e813d..3ed43219f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js >@@ -192,6 +192,9 @@ $(document).ready(function () { > }).on("change", function () { > if (!is_valid_date($(this).val())) { > $(this).val(""); >+ } else { >+ var the_date = $.datepicker.parseDate(dateformat_string, $(this).val()); >+ $(this).datepicker("setDate",the_date); > } > }); > // http://jqueryui.com/demos/datepicker/#date-range >-- >2.20.1
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 28538
:
121745
|
121784
|
121882