Bug 29229

Summary: Use Flatpickr in suggestion search sidebar filter
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, testopia
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29270
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 28983, 29241    
Bug Blocks: 29239    
Attachments: Bug 29229: Use Flatpickr in suggestion search sidebar filter
Bug 29229: Use Flatpickr in suggestion search sidebar filter
Bug 29229: Use Flatpickr in suggestion search sidebar filter
Bug 29229: (follow-up) Update method for linking flatpickr fields

Description Owen Leonard 2021-10-13 16:11:47 UTC
The suggestion entry form was upgraded to use Flatpickr but missed the jQueryUI datepickers in the suggestion search sidebar.
Comment 1 Owen Leonard 2021-10-13 19:12:20 UTC Comment hidden (obsolete)
Comment 2 David Nind 2021-10-14 09:38:01 UTC
Created attachment 126261 [details] [review]
Bug 29229: Use Flatpickr in suggestion search sidebar filter

This patch corrects the date field configurations for the suggestions
sidebar filter. These fields are now linked Flatpickr widgets instead of
jQueryUI datepickers.

To test, apply the patch and go to Suggestions.

- In the sidebar, click "Suggestion information" to expand the form.
- Test these linked date fields:
  - "Suggested date from" and "to"
  - "Managed date from" and "to"
  - "Accepted by from" and "to"
- Each should trigger Flatpickr calendars which are linked, i.e. you
  can't select a "to" date which is before a "from" date.
- Test that the dates submit correctly to filter as expected.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-10-18 21:57:43 UTC
Created attachment 126466 [details] [review]
Bug 29229: Use Flatpickr in suggestion search sidebar filter

This patch corrects the date field configurations for the suggestions
sidebar filter. These fields are now linked Flatpickr widgets instead of
jQueryUI datepickers.

To test, apply the patch and go to Suggestions.

- In the sidebar, click "Suggestion information" to expand the form.
- Test these linked date fields:
  - "Suggested date from" and "to"
  - "Managed date from" and "to"
  - "Accepted by from" and "to"
- Each should trigger Flatpickr calendars which are linked, i.e. you
  can't select a "to" date which is before a "from" date.
- Test that the dates submit correctly to filter as expected.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-10-21 10:18:32 UTC
We must remove flatpickr instantiation from .tt
Comment 5 Owen Leonard 2021-10-26 18:21:24 UTC
Created attachment 126930 [details] [review]
Bug 29229: (follow-up) Update method for linking flatpickr fields
Comment 6 Jonathan Druart 2021-10-28 15:45:14 UTC
Pushed to master for 21.11, thanks to everybody involved!