Bugzilla – Attachment 121745 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.47 KB, created by
Nick Clemens (kidclamp)
on 2021-06-09 18:03:01 UTC
(
hide
)
Description:
Bug 28538: Insert formatted date if valid
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-06-09 18:03:01 UTC
Size:
2.47 KB
patch
obsolete
>From 88df29c186b227dcf070979c229ed823d3152399 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 >--- > koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/calendar.js | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >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 2b335ec9bc..3ed43219f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js >@@ -193,7 +193,8 @@ $(document).ready(function () { > if (!is_valid_date($(this).val())) { > $(this).val(""); > } else { >- $(this).datepicker("setDate",$(this).val()); >+ var the_date = $.datepicker.parseDate(dateformat_string, $(this).val()); >+ $(this).datepicker("setDate",the_date); > } > }); > // http://jqueryui.com/demos/datepicker/#date-range >-- >2.11.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 28538
:
121745
|
121784
|
121882