Bug 29229 - Use Flatpickr in suggestion search sidebar filter
Summary: Use Flatpickr in suggestion search sidebar filter
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 28983 29241
Blocks: 29239
  Show dependency treegraph
 
Reported: 2021-10-13 16:11 UTC by Owen Leonard
Modified: 2022-07-15 09:12 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:


Attachments
Bug 29229: Use Flatpickr in suggestion search sidebar filter (5.64 KB, patch)
2021-10-13 19:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29229: Use Flatpickr in suggestion search sidebar filter (5.69 KB, patch)
2021-10-14 09:38 UTC, David Nind
Details | Diff | Splinter Review
Bug 29229: Use Flatpickr in suggestion search sidebar filter (5.76 KB, patch)
2021-10-18 21:57 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29229: (follow-up) Update method for linking flatpickr fields (6.62 KB, patch)
2021-10-26 18:21 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!