[Bug 29394] New: Remove flatpickr instantiations from .tt files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Bug ID: 29394 Summary: Remove flatpickr instantiations from .tt files Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org The instantiation must be done by the JS from calendar.inc, based on the classes of the inputs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29270 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29270 [Bug 29270] Use flatpickr and futuredate on reserve/request.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29239 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29239 [Bug 29239] [OMNIBUS] Replace jQueryUI's timepicker with flatpickr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127683&action=edit Bug 29394: Remove flatpickr instantiations from most of the tt files We must reduce the instantiations as much as possible to take advantages of the default values and specific behaviours we have defined in calendar.inc This patch is suggesting to have a .flatpickr class and using the data attributes: - flatpickr-futuredate - flatpickr-pastdate - flatpickr-enable-time - flatpickr-on-close-focus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, oleonard@myacpl.org Status|NEW |In Discussion --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Owen, Martin, this is what I had in mind. Do you agree with the idea? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29477 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29477 [Bug 29477] flatpickr default time should be 23:59 (11:59 pm as well, probably), not 12:00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |jonathan.druart+koha@gmail. | |com Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 127699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127699&action=edit Bug 29394: (follow-up) Pass correct time format and other corrections This patch makes a few corrections, including adding the correct Flatpickr date format option when the timepicker is enabled. The patch also corrects a couple of places where the wrong date field was modified with the new data attributes. To test, apply the patch and test the datepickers on the batch checkout and renew pages. When you select a date and time the "TimeFormat" system preference should be correctly applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127699|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 127700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127700&action=edit Bug 29394: (follow-up) Pass correct time format and other corrections This patch makes a few corrections, including adding the correct Flatpickr date format option when the timepicker is enabled. Besides past and future date options, I've added a "pastinclusive" option which allows dates in the past OR today. This option was previously applied to the checkin page. The patch also corrects a couple of places where the wrong date field was modified with the new data attributes. To test, apply the patch and test the datepickers on the batch checkout and renew pages. When you select a date and time the "TimeFormat" system preference should be correctly applied. The calendar widget on the checkin page should allow you to select today's date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- One problem I wasn't able to understand: If you configure an input with the "pastdate" or "pastinclusive" option AND enable the time picker the defaultHour and defaultMinute options are lost. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127707&action=edit Bug 29394: adjust request.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- <div><label for="hard_due_date" class="hint">Renewal due date [% INCLUDE 'date-format.inc' %]:</label></div> - <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" /> + <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-enable-time="true" /> I think this is wrong, before this patchset we didn't have a "future" restriction on the renewal due date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29500 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29500 [Bug 29500] Flatpickr accepting original date in the past for futuredate but also other dates in the past -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127715&action=edit Bug 29394: Remove futuredate for renew -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Owen Leonard from comment #5)
One problem I wasn't able to understand: If you configure an input with the "pastdate" or "pastinclusive" option AND enable the time picker the defaultHour and defaultMinute options are lost.
I think that's because because TODAY 23:59 is in the future :-/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127683|0 |1 is obsolete| | Attachment #127700|0 |1 is obsolete| | Attachment #127707|0 |1 is obsolete| | Attachment #127715|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127716&action=edit Bug 29394: Remove flatpickr instantiations from most of the tt files We must reduce the instantiations as much as possible to take advantages of the default values and specific behaviours we have defined in calendar.inc This patch is suggesting to have a .flatpickr class and using the data attributes: - flatpickr-futuredate - flatpickr-pastdate - flatpickr-enable-time - flatpickr-on-close-focus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127717&action=edit Bug 29394: (follow-up) Pass correct time format and other corrections This patch makes a few corrections, including adding the correct Flatpickr date format option when the timepicker is enabled. Besides past and future date options, I've added a "pastinclusive" option which allows dates in the past OR today. This option was previously applied to the checkin page. The patch also corrects a couple of places where the wrong date field was modified with the new data attributes. To test, apply the patch and test the datepickers on the batch checkout and renew pages. When you select a date and time the "TimeFormat" system preference should be correctly applied. The calendar widget on the checkin page should allow you to select today's date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127718&action=edit Bug 29394: adjust request.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127719&action=edit Bug 29394: Remove futuredate for renew -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127716|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127723&action=edit Bug 29394: Remove flatpickr instantiations from most of the tt files We must reduce the instantiations as much as possible to take advantages of the default values and specific behaviours we have defined in calendar.inc This patch is suggesting to have a .flatpickr class and using the data attributes: - flatpickr-futuredate - flatpickr-pastdate - flatpickr-enable-time - flatpickr-on-close-focus Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127717|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127724&action=edit Bug 29394: (follow-up) Pass correct time format and other corrections This patch makes a few corrections, including adding the correct Flatpickr date format option when the timepicker is enabled. Besides past and future date options, I've added a "pastinclusive" option which allows dates in the past OR today. This option was previously applied to the checkin page. The patch also corrects a couple of places where the wrong date field was modified with the new data attributes. To test, apply the patch and test the datepickers on the batch checkout and renew pages. When you select a date and time the "TimeFormat" system preference should be correctly applied. The calendar widget on the checkin page should allow you to select today's date. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127718|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127725&action=edit Bug 29394: adjust request.tt Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127719|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 127726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127726&action=edit Bug 29394: Remove futuredate for renew Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Bug 29394 depends on bug 29477, which changed state. Bug 29477 Summary: flatpickr default time should be 23:59 (11:59 pm as well, probably), not 12:00 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29477 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Signed Off --- Comment #18 from David Nind <david@davidnind.com> --- It looks to me as though Martin has signed this off - have changed the status. Feel free to change back and I will test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Also needs to be a 21.11 candidate because of dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to David Nind from comment #18)
It looks to me as though Martin has signed this off - have changed the status. Feel free to change back and I will test.
Thanks David, you're right.. I had just forgotten to change the state. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #21 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Skipping QA, we need it pushed ASAP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 --- Comment #22 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29394 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29735 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29735 [Bug 29735] Remove flatpickr instantiations from .js files -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org