Bug 29228

Summary: Use Flatpickr on offline circulation page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Bug Depends on: 29255    
Bug Blocks: 29239, 30011    
Attachments: Bug 29228: Use Flatpickr on offline circulation page
Bug 29228: Use Flatpickr on offline circulation page
Bug 29228: Use Flatpickr on offline circulation page

Description Owen Leonard 2021-10-13 16:08:27 UTC
The offline circulation page wasn't included when Bug 28937 was submitted.
Comment 1 Owen Leonard 2021-10-29 13:29:01 UTC
Created attachment 127095 [details] [review]
Bug 29228: Use Flatpickr on offline circulation page

This patch replaces the use of jQueryUI datepicker on the built-in
offline circulation page, where it was used for the "Specify due date"
date-time picker as well as for formatting datetime values for display.

To test, apply the patch and go to Circulation -> Built-in offline
circulation interface.

 - Click "Synchronize."
 - Click "Download records."
 - Submit a card number for a patron who has multiple items checked out.
 - In the table of previous checkouts, confirm that dates in the "Date
   due" and "Checked out on" columns are formatted according to your
   TimeFormat and DateFormat system preferences.
 - When checking out to a patron with fines, open the fines tab and
   submit an amount in payment. The table of payments should include a
   correctly-formatted datetime.
 - Test that the "Specify due date" date picker works correctly and that
   checkouts show the correct date.
Comment 2 Owen Leonard 2021-12-09 12:49:57 UTC
I'm removing the dependency on Bug 22671 because it's not strictly necessary, it just makes it easier to identify whether you're testing in a browser which will work.
Comment 3 Martin Renvoize 2022-01-31 09:45:52 UTC
Created attachment 129986 [details] [review]
Bug 29228: Use Flatpickr on offline circulation page

This patch replaces the use of jQueryUI datepicker on the built-in
offline circulation page, where it was used for the "Specify due date"
date-time picker as well as for formatting datetime values for display.

To test, apply the patch and go to Circulation -> Built-in offline
circulation interface.

 - Click "Synchronize."
 - Click "Download records."
 - Submit a card number for a patron who has multiple items checked out.
 - In the table of previous checkouts, confirm that dates in the "Date
   due" and "Checked out on" columns are formatted according to your
   TimeFormat and DateFormat system preferences.
 - When checking out to a patron with fines, open the fines tab and
   submit an amount in payment. The table of payments should include a
   correctly-formatted datetime.
 - Test that the "Specify due date" date picker works correctly and that
   checkouts show the correct date.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2022-01-31 09:46:42 UTC
Works nicely, sorry it took me so long to get around to.. it kept falling off the list.

Signing off.
Comment 5 Katrin Fischer 2022-03-27 01:07:02 UTC
The download records step only works with turned off strict SQL mode, I've filed: 
Bug 30369 - Downloading records for inbuilt offline circulation fails with strict SQL setting
Comment 6 Katrin Fischer 2022-03-27 01:08:24 UTC
Created attachment 132271 [details] [review]
Bug 29228: Use Flatpickr on offline circulation page

This patch replaces the use of jQueryUI datepicker on the built-in
offline circulation page, where it was used for the "Specify due date"
date-time picker as well as for formatting datetime values for display.

To test, apply the patch and go to Circulation -> Built-in offline
circulation interface.

 - Click "Synchronize."
 - Click "Download records."
 - Submit a card number for a patron who has multiple items checked out.
 - In the table of previous checkouts, confirm that dates in the "Date
   due" and "Checked out on" columns are formatted according to your
   TimeFormat and DateFormat system preferences.
 - When checking out to a patron with fines, open the fines tab and
   submit an amount in payment. The table of payments should include a
   correctly-formatted datetime.
 - Test that the "Specify due date" date picker works correctly and that
   checkouts show the correct date.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Fridolin Somers 2022-04-08 13:52:50 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄