There are few instances of the jQueryUI datepicker in the OPAC templates which should be replaced with Flatpickr.
Created attachment 126229 [details] [review] Bug 29212: Use Flatpickr on OPAC pages This patch adds Flatpickr assets to the OPAC (JS and SCSS). A few pages are updated to use Flatpickr instead of jQueryUI datepickers. jQueryUI CSS files are updated because they contain some font family definitions which are simple to remove but overly complicated to override. Without this change some Font Awesome icons are broken when they appear inside jQueryUI widgets like tabs. We don't run the risk of having this change overwritten by a future jQueryUI upgrade because there won't be any more. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log into the OPAC and check that date pickers on the following pages work correctly, including month selection, year selection, forward and back arrows, and "Clear date" controls: - Go to the "Your personal details" page. - Check the "Date of birth" field. - With SuspendHoldsOpac enabled, view the "Your summary" page for a patron with pending holds. - Click "Suspend" to confirm that the "Suspend until" datepicker works correctly for more than one hold. - From the catalog search results page, select multiple results and click the "Place hold" link. - On the hold confirmation page, click "Show more options" to test the "Hold starts on date" (with OPACAllowHoldDateInFuture enabled) and the "Hold not needed after" fields.
Created attachment 126290 [details] Bug 29212 - Date picker not working For me the date picker is not working for suspend all holds until... It was working (using the jquery date picker) before applying the patch. It is working when you suspend the hold for an individual item.
Ignore my previous comment - I post the screen shot just after you had obsoleted the patch!
Sorry David, Bug 29240 provides a better solution for some of the linked date fields affected by this patch. I'll get a revised patch up soon. Thanks for testing!
Created attachment 126298 [details] [review] Bug 29212: Use Flatpickr on OPAC pages This patch adds Flatpickr assets to the OPAC (JS and SCSS). A few pages are updated to use Flatpickr instead of jQueryUI datepickers. jQueryUI CSS files are updated because they contain some font family definitions which are simple to remove but overly complicated to override. Without this change some Font Awesome icons are broken when they appear inside jQueryUI widgets like tabs. We don't run the risk of having this change overwritten by a future jQueryUI upgrade because there won't be any more. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log into the OPAC and check that date pickers on the following pages work correctly, including month selection, year selection, forward and back arrows, and "Clear date" controls: - Go to the "Your personal details" page. - Check the "Date of birth" field. - With SuspendHoldsOpac enabled, view the "Your summary" page for a patron with pending holds. - Click "Suspend" to confirm that the "Suspend until" datepicker works correctly for more than one hold. - From the catalog search results page, select multiple results and click the "Place hold" link. - On the hold confirmation page, click "Show more options" to test the "Hold starts on date" (with OPACAllowHoldDateInFuture enabled) and the "Hold not needed after" fields.
Created attachment 126299 [details] [review] Bug 29212: (follow-up) Incorporate linked date field code from Bug 29240
Comment #2 still applies for me - date picker not working for suspend all holds until ... (see screenshot)
Created attachment 126820 [details] [review] Bug 29212: (follow-up) Update missing date input I missed the "Suspend all holds" date input in previous patches.
(In reply to David Nind from comment #7) > Comment #2 still applies for me - date picker not working for suspend all > holds until ... (see screenshot) Sorry David that was pure carelessness on my part! Thanks for testing!
Created attachment 126824 [details] [review] Bug 29212: Use Flatpickr on OPAC pages This patch adds Flatpickr assets to the OPAC (JS and SCSS). A few pages are updated to use Flatpickr instead of jQueryUI datepickers. jQueryUI CSS files are updated because they contain some font family definitions which are simple to remove but overly complicated to override. Without this change some Font Awesome icons are broken when they appear inside jQueryUI widgets like tabs. We don't run the risk of having this change overwritten by a future jQueryUI upgrade because there won't be any more. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log into the OPAC and check that date pickers on the following pages work correctly, including month selection, year selection, forward and back arrows, and "Clear date" controls: - Go to the "Your personal details" page. - Check the "Date of birth" field. - With SuspendHoldsOpac enabled, view the "Your summary" page for a patron with pending holds. - Click "Suspend" to confirm that the "Suspend until" datepicker works correctly for more than one hold. - From the catalog search results page, select multiple results and click the "Place hold" link. - On the hold confirmation page, click "Show more options" to test the "Hold starts on date" (with OPACAllowHoldDateInFuture enabled) and the "Hold not needed after" fields. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 126825 [details] [review] Bug 29212: (follow-up) Incorporate linked date field code from Bug 29240 Signed-off-by: David Nind <david@davidnind.com>
Created attachment 126826 [details] [review] Bug 29212: (follow-up) Update missing date input I missed the "Suspend all holds" date input in previous patches. Signed-off-by: David Nind <david@davidnind.com>
There is something odd going on in the suspend holds modal. Dateformat: DD.MM.YYYY - Suspend individual hold from OPAC staff acount using the link in the table - Click into the date field and set a date, example: 16.11.2021 - Empty the field using the x a the end of the input (NOT the link) - Click on the calendar again - it's set to nowhere with month empty - Try to pick a month from the pull down - it's not working The date of birth on patron details page works correctly in comparison.
Created attachment 127250 [details] [review] Bug 29212: (follow-up) Fixes to suspend hold process This patch reworks the process of suspending an individual hold from the patron's hold list. Instead of repeating the modal markup in each line of the holds table, a single modal is re-used. A "focus: false" is added to the modal via a data-attribute in order to overcome problems with selecting months and using keyboard navigation in the calendar popup. To test, apply the patch and log into the OPAC as a user with holds. - View the holds tab under "Your summary." - Click the "Suspend" button next to one of the holds. - You should see a modal which shows the title of the item in question. - Test that the date picker works correctly: - Test selecting a month and year - Test selecting a date both with the mouse and by using arrow keys. - Test that you can clear the selected date both by clicking the X and by clicking the text link. - Select a date and close the modal without submitting the suspension. - Click the "Suspend" link on another title to confirm that the date picker still works correctly. - Submit a suspension and confirm that the it completes successfully. -
opac-reserve: date in the past can be selected.
Created attachment 129620 [details] [review] Bug 29212: (follow-up) Add futuredate attribute to date picker This patch adds the "futuredate" attribute to the "Hold not needed after" date field in the OPAC hold process. To test, apply the patch and log into the OPAC. - Locate a bibliographic record and being the process of placing a hold. - Click "Show more options" to display the date fields. - If the OPACAllowHoldDateInFuture system preferences is enabled: - Set "Hold starts on date" to a date in the future. - Trigger the date-picker in the "Hold not needed after" field: You should be limited to dates *after* the date you selected above. - If OPACAllowHoldDateInFuture is disabled: - The "Hold starts on date" will no longer be present. - Trigger the date-picker in the "Hold not needed after" field: You should be limited to dates after today.
Created attachment 129638 [details] [review] Bug 29212: Use Flatpickr on OPAC pages This patch adds Flatpickr assets to the OPAC (JS and SCSS). A few pages are updated to use Flatpickr instead of jQueryUI datepickers. jQueryUI CSS files are updated because they contain some font family definitions which are simple to remove but overly complicated to override. Without this change some Font Awesome icons are broken when they appear inside jQueryUI widgets like tabs. We don't run the risk of having this change overwritten by a future jQueryUI upgrade because there won't be any more. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Log into the OPAC and check that date pickers on the following pages work correctly, including month selection, year selection, forward and back arrows, and "Clear date" controls: - Go to the "Your personal details" page. - Check the "Date of birth" field. - With SuspendHoldsOpac enabled, view the "Your summary" page for a patron with pending holds. - Click "Suspend" to confirm that the "Suspend until" datepicker works correctly for more than one hold. - From the catalog search results page, select multiple results and click the "Place hold" link. - On the hold confirmation page, click "Show more options" to test the "Hold starts on date" (with OPACAllowHoldDateInFuture enabled) and the "Hold not needed after" fields. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129639 [details] [review] Bug 29212: (follow-up) Incorporate linked date field code from Bug 29240 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129640 [details] [review] Bug 29212: (follow-up) Update missing date input I missed the "Suspend all holds" date input in previous patches. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129641 [details] [review] Bug 29212: (follow-up) Fixes to suspend hold process This patch reworks the process of suspending an individual hold from the patron's hold list. Instead of repeating the modal markup in each line of the holds table, a single modal is re-used. A "focus: false" is added to the modal via a data-attribute in order to overcome problems with selecting months and using keyboard navigation in the calendar popup. To test, apply the patch and log into the OPAC as a user with holds. - View the holds tab under "Your summary." - Click the "Suspend" button next to one of the holds. - You should see a modal which shows the title of the item in question. - Test that the date picker works correctly: - Test selecting a month and year - Test selecting a date both with the mouse and by using arrow keys. - Test that you can clear the selected date both by clicking the X and by clicking the text link. - Select a date and close the modal without submitting the suspension. - Click the "Suspend" link on another title to confirm that the date picker still works correctly. - Submit a suspension and confirm that the it completes successfully. - Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129642 [details] [review] Bug 29212: (follow-up) Add futuredate attribute to date picker This patch adds the "futuredate" attribute to the "Hold not needed after" date field in the OPAC hold process. To test, apply the patch and log into the OPAC. - Locate a bibliographic record and being the process of placing a hold. - Click "Show more options" to display the date fields. - If the OPACAllowHoldDateInFuture system preferences is enabled: - Set "Hold starts on date" to a date in the future. - Trigger the date-picker in the "Hold not needed after" field: You should be limited to dates *after* the date you selected above. - If OPACAllowHoldDateInFuture is disabled: - The "Hold starts on date" will no longer be present. - Trigger the date-picker in the "Hold not needed after" field: You should be limited to dates after today. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Thx Joubu - glad to see this one moving.
Great work :) I see patch '(follow-up) Update missing date input' removes the hint text 'Clear date to suspend indefinitely', after 'Suspend all holds' : - <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a> Is it on purpose ? This text still exists in modal when suspending one hold. In my opinion, this hint should be grey and not a link, the red cross already does the clear action.
Created attachment 130019 [details] [review] Bug 29212: (follow-up) Restore "Clear date" text for "Suspend all holds" This patch restores the "Clear date to suspend indefinitely" link associated with the "Suspend all holds" date input field. The patch also introduces a generic ".clear-flatpickr" click handler for Flatpickr instances.
Great, thanks a lot Owen
Pushed to master for 22.05, thanks to everybody involved [U+1F984]