Summary: | Enrollment period date on patron category can be set in the past without any error/warning messages | ||
---|---|---|---|
Product: | Koha | Reporter: | Alex Buckley <alexbuckley> |
Component: | System Administration | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P3 | CC: | gmcharlt, hayleypelham, lucas, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.05.00, 18.11.05
|
|
Circulation function: | |||
Attachments: |
Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages
Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages |
Description
Alex Buckley
2017-01-30 03:52:56 UTC
Check out the options for the datepicker widget which can limit the range of dates which will be accepted. https://jqueryui.com/datepicker/#min-max For instance, in returns.tt starting at line 60. That template also has some back-up date testing in case someone types an invalid date directly. Still valid, resetting to master and rephrasing/shortening bug title a bit. (In reply to Katrin Fischer from comment #2) > Still valid, resetting to master and rephrasing/shortening bug title a bit. I have tried to fix this to no avail. Min-max were specified but did not work. Am resetting to new as someone more familiar with Javascript may wish to have a crack at it. Created attachment 87878 [details] [review] Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages This patch modifies the patron category edit form so that the enrollment period datepicker widget cannot be used to select a date in the past. The <input> element had a "datepicker" class, which triggers a default datepicker configuration. This was overriding the configuration in the page-specific JavaScript file. To test, apply the patch and go to Administration -> Patron categories. Click the "Enrollment period -> Until date" field and verify that dates before today are disabled. Created attachment 87935 [details] [review] Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages This patch modifies the patron category edit form so that the enrollment period datepicker widget cannot be used to select a date in the past. The <input> element had a "datepicker" class, which triggers a default datepicker configuration. This was overriding the configuration in the page-specific JavaScript file. To test, apply the patch and go to Administration -> Patron categories. Click the "Enrollment period -> Until date" field and verify that dates before today are disabled. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Created attachment 87973 [details] [review] Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages This patch modifies the patron category edit form so that the enrollment period datepicker widget cannot be used to select a date in the past. The <input> element had a "datepicker" class, which triggers a default datepicker configuration. This was overriding the configuration in the page-specific JavaScript file. To test, apply the patch and go to Administration -> Patron categories. Click the "Enrollment period -> Until date" field and verify that dates before today are disabled. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.05 backported to 18.05.x for 18.05.13 |