Bugzilla – Attachment 126342 Details for
Bug 29240
Flatpickr - error in the console when a date is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29240: (follow-up) Correct more instances
Bug-29240-follow-up-Correct-more-instances.patch (text/plain), 25.46 KB, created by
Martin Renvoize (ashimema)
on 2021-10-15 14:20:48 UTC
(
hide
)
Description:
Bug 29240: (follow-up) Correct more instances
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-15 14:20:48 UTC
Size:
25.46 KB
patch
obsolete
>From 6d659252c70d21651212194898ce8c3c515ea6f3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 14 Oct 2021 17:05:07 +0000 >Subject: [PATCH] Bug 29240: (follow-up) Correct more instances > >This patch fixes linked date fields in these pages: > > - Reports -> Patrons with the most checkouts > - Reports -> Patrons statistics wizard > - Reports -> Most-circulated items > - Reports -> Catalog statistics wizard > - Reports -> Guided reports > - Reports -> Average loan time > - Reports -> Holds statistics wizard > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/reports/bor_issues_top.tt | 37 ++------ > .../en/modules/reports/borrowers_stats.tt | 19 +--- > .../prog/en/modules/reports/cat_issues_top.tt | 39 ++------ > .../en/modules/reports/catalogue_stats.tt | 34 ++----- > .../modules/reports/guided_reports_start.tt | 21 +---- > .../en/modules/reports/issues_avg_stats.tt | 39 ++------ > .../prog/en/modules/reports/reserves_stats.tt | 88 ++++--------------- > 7 files changed, 44 insertions(+), 233 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt >index 2d819f6262..b784b8a563 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tt >@@ -120,16 +120,18 @@ > <ol> > <li> > <label for="checkoutfrom">Checkout date from:</label> >- <input type="text" size="10" id="checkoutfrom" name="Filter" /> >+ <input type="text" size="10" id="checkoutfrom" name="Filter" class="flatpickr" data-start_for="checkoutto" /> >+ > <label class="inline" for="checkoutto">To: </label> >- <input size="10" id="checkoutto" name="Filter" value="" type="text" /> >+ <input size="10" id="checkoutto" name="Filter" value="" type="text" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </li> > <li> > <label for="checkinfrom">Check-in date from:</label> >- <input type="text" size="10" id="checkinfrom" name="Filter" /> >+ <input type="text" size="10" id="checkinfrom" name="Filter" class="flatpickr" data-start_for="checkinto" /> >+ > <label class="inline" for="checkinto">To: </label> >- <input type="text" size="10" id="checkinto" name="Filter" value="" /> >+ <input type="text" size="10" id="checkinto" name="Filter" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </li> > <li> >@@ -227,33 +229,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- $(document).ready(function() { >- var checkoutfrom = $("#checkoutfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkoutto.set('minDate', selectedDates[0]); >- } >- }); >- var checkoutto = $("#checkoutto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var checkinfrom = $("#checkinfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkinto.set('minDate', selectedDates[0]); >- } >- }); >- var checkinto = $("#checkinto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- }); >- </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >index f08b356023..8ae1d0627a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >@@ -181,9 +181,9 @@ > <td colspan="2"></td> > <td> > <label for="from">From</label> >- <input type="text" size="10" id="from" name="Filter" class="" /> >+ <input type="text" size="10" id="from" name="Filter" class="flatpickr"data-start_for="to" /> > <label for="to">To</label> >- <input size="10" id="to" name="Filter" value="" type="text" class="" /> >+ <input size="10" id="to" name="Filter" value="" type="text" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -330,21 +330,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- $(document).ready(function(){ >- var startPicker = $("#from").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- endPicker.set('minDate', selectedDates[0]); >- } >- }); >- var endPicker = $("#to").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- }); >- </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >index 7d4aa27b51..910caa92db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >@@ -97,16 +97,18 @@ > <ol> > <li> > <label for="checkoutfrom">Checkout date from: </label> >- <input type="text" size="10" id="checkoutfrom" name="Filter" /> >+ <input type="text" size="10" id="checkoutfrom" name="Filter" data-start_for="checkoutto" class="flatpickr" /> >+ > <label for="checkoutto" class="inline">To:</label> >- <input size="10" id="checkoutto" name="Filter" value="" type="text" /> >+ <input size="10" id="checkoutto" name="Filter" value="" type="text" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </li> > <li> > <label for="checkinfrom">Check-in date from</label> >- <input type="text" size="10" id="checkinfrom" name="Filter" /> >+ <input type="text" size="10" id="checkinfrom" name="Filter" data-start_for="checkinto" class="flatpickr" /> >+ > <label for="checkinto" class="inline">To: </label> >- <input type="text" size="10" id="checkinto" name="Filter" value="" /> >+ <input type="text" size="10" id="checkinto" name="Filter" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </li> > <li> >@@ -225,35 +227,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- [% UNLESS ( do_it ) %] >- $(document).ready(function() { >- var checkoutfrom = $("#checkoutfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkoutto.set('minDate', selectedDates[0]); >- } >- }); >- var checkoutto = $("#checkoutto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var checkinfrom = $("#checkinfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkinto.set('minDate', selectedDates[0]); >- } >- }); >- var checkinto = $("#checkinto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- }); >- [% END %] >- </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >index effe64e508..bdaba8e80b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt >@@ -252,9 +252,10 @@ > <td><input type="radio" name="Column" value="items.dateaccessioned" /></td> > <td> > <label for="acqdateFrom">From</label> >- <input type="text" name="Filter" id="acqdateFrom" /> >+ <input type="text" name="Filter" id="acqdateFrom" data-start_for="acqdateTo" class="flatpickr" /> >+ > <label for="acqdateTo">To</label> >- <input type="text" name="Filter" id="acqdateTo" /> >+ <input type="text" name="Filter" id="acqdateTo" class="flatpickr" /> > </td> > </tr> > <tr id="removeddatetr"> >@@ -263,9 +264,10 @@ > <td><input type="radio" name="Column" value="deleteditems.timestamp" /></td> > <td> > <label for="deldateFrom">From</label> >- <input type="text" name="Filter" id="deldateFrom" /> >+ <input type="text" name="Filter" id="deldateFrom" data-start_for="deldateTo" class="flatpickr" /> >+ > <label for="deldateTo">To</label> >- <input type="text" name="Filter" id="deldateTo" /> >+ <input type="text" name="Filter" id="deldateTo" class="flatpickr" /> > </td> > </tr> > </tbody> >@@ -354,30 +356,6 @@ > > $(document).ready(function() { > >- var acqdateFrom = $("#acqdateFrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- acqdateTo.set('minDate', selectedDates[0]); >- } >- }); >- var acqdateTo = $("#acqdateTo").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var deldateFrom = $("#deldateFrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- deldateTo.set('minDate', selectedDates[0]); >- } >- }); >- var deldateTo = $("#deldateTo").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- > $("input[name='Cellvalue']").change(function() { > changeRemovedDateTrStatus(); > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 1a4c2d9a3d..9211b4a96d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -619,9 +619,9 @@ > [% IF ( criteri.daterange ) %] > <td> > from >- <input type="text" size="10" id="from_[% criteri.name.remove('\.') | html %]_value" name="from_[% criteri.name | html %]_value" value="" /> >+ <input type="text" size="10" id="from_[% criteri.name.remove('\.') | html %]_value" name="from_[% criteri.name | html %]_value" value="" data-start_for="to_[% criteri.name.remove('\.') | html %]_value" class="flatpickr" /> > to >- <input type="text" size="10" id="to_[% criteri.name.remove('\.') | html %]_value" name="to_[% criteri.name | html %]_value" value="" /> >+ <input type="text" size="10" id="to_[% criteri.name.remove('\.') | html %]_value" name="to_[% criteri.name | html %]_value" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -2189,23 +2189,6 @@ > readOnly: true > }); > } >- [% IF ( build4 ) %] >- [% FOREACH criteri IN criteria %] >- [% IF ( criteri.daterange ) %] >- var from_[% criteri.name.remove('\.') | html %]_value = $("#from_[% criteri.name.remove('\.') | html %]_value").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- to_[% criteri.name.remove('\.') | html %]_value.set('minDate', selectedDates[0]); >- } >- }); >- var to_[% criteri.name.remove('\.') | html %]_value = $("#to_[% criteri.name.remove('\.') | html %]_value").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- [% END %] >- [% END %] >- [% END %] > </script> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >index 47138b735d..bb1e3200bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt >@@ -105,9 +105,10 @@ > <td><input type="radio" checked="checked" name="Column" value="timestamp" /></td> > <td> > <label for="checkoutfrom">From</label> >- <input type="text" size="10" id="checkoutfrom" name="Filter" /> >+ <input type="text" size="10" id="checkoutfrom" name="Filter" data-start_for="checkouto" class="flatpickr" /> >+ > <label for="checkouto">To</label> >- <input size="10" id="checkouto" name="Filter" value="" type="text" /> >+ <input size="10" id="checkouto" name="Filter" value="" type="text" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -119,7 +120,7 @@ > <option value ="2">Month</option> > <option value ="3">Year</option> > </select> >- >+ > </td> > <td><!--Preparing Month and Day Selection--><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td> > </tr> >@@ -129,9 +130,10 @@ > <td><input type="radio" name="Column" value="returndate" /></td> > <td> > <label for="checkinfrom">From</label> >- <input type="text" size="10" id="checkinfrom" name="Filter" /> >+ <input type="text" size="10" id="checkinfrom" name="Filter" data-start_for="checkinto" class="flatpickr" /> >+ > <label for="checkinto">To</label> >- <input type="text" size="10" id="checkinto" name="Filter" value="" /> >+ <input type="text" size="10" id="checkinto" name="Filter" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -266,33 +268,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- $(document).ready(function() { >- var checkoutfrom = $("#checkoutfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkouto.set('minDate', selectedDates[0]); >- } >- }); >- var checkouto = $("#checkouto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var checkinfrom = $("#checkinfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- checkinto.set('minDate', selectedDates[0]); >- } >- }); >- var checkinto = $("#checkinto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- }); >- </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >index 4db7612a5d..59cd4aca36 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >@@ -125,9 +125,10 @@ > <td><input type="radio" name="Column" value="reservedate" /></td> > <td> > <label for="filter_reservedate_begin">From</label> >- <input type="text" size="10" id="filter_reservedate_begin" name="filter_reservedate_begin" /> >+ <input type="text" size="10" id="filter_reservedate_begin" data-start_for="filter_reservedate_end" name="filter_reservedate_begin" class="flatpickr" /> >+ > <label for="filter_reservedate_end">To</label> >- <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" /> >+ <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" class="flatpickr" /> > </td> > </tr> > <tr> >@@ -136,9 +137,10 @@ > <td><input type="radio" name="Column" value="notificationdate" /></td> > <td> > <label for="filter_notificationdate_begin">From</label> >- <input type="text" size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" /> >+ <input type="text" size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" data-start_for="filter_notificationdate_end" class="flatpickr" /> >+ > <label for="filter_notificationdate_end">To</label> >- <input size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" /> >+ <input size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" class="flatpickr" /> > </td> > </tr> > <tr> >@@ -147,9 +149,10 @@ > <td><input type="radio" name="Column" value="reminderdate" /></td> > <td> > <label for="filter_reminderdate_begin">From</label> >- <input type="text" size="10" id="filter_reminderdate_begin" name="Filter" /> >+ <input type="text" size="10" id="filter_reminderdate_begin" name="Filter" data-start_for="filter_reminderdate_end" class="flatpickr" /> >+ > <label for="filter_reminderdate_end">To</label> >- <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" /> >+ <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" class="flatpickr" /> > </td> > </tr> > <tr> >@@ -158,9 +161,10 @@ > <td><input type="radio" name="Column" value="waitingdate" /></td> > <td> > <label for="filter_waitingdate_begin">From</label> >- <input type="text" size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" /> >+ <input type="text" size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" data-start_for="filter_waitingdate_end" class="flatpickr" /> >+ > <label for="filter_waitingdate_end">To</label> >- <input size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" /> >+ <input size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" class="flatpickr" /> > </td> > </tr> > <tr> >@@ -169,9 +173,10 @@ > <td><input type="radio" name="Column" value="cancellationdate" /></td> > <td> > <label for="filter_cancellationdate_begin">From</label> >- <input type="text" size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" /> >+ <input type="text" size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" data-start_for="filter_cancellationdate_end" class="flatpickr" /> >+ > <label for="filter_cancellationdate_end">To</label> >- <input size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" /> >+ <input size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" class="flatpickr" /> > </td> > </tr> > <tr> >@@ -338,69 +343,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- $(document).ready(function() { >- var filter_reservedate_begin = $("#filter_reservedate_begin").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- filter_reservedate_end.set('minDate', selectedDates[0]); >- } >- }); >- var filter_reservedate_end = $("#filter_reservedate_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var filter_notificationdate_begin = $("#filter_notificationdate_begin").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- filter_notificationdate_end.set('minDate', selectedDates[0]); >- } >- }); >- var filter_notificationdate_end = $("#filter_notificationdate_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var filter_reminderdate_begin = $("#filter_reminderdate_begin").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- filter_reminderdate_end.set('minDate', selectedDates[0]); >- } >- }); >- var filter_reminderdate_end = $("#filter_reminderdate_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var filter_waitingdate_begin = $("#filter_waitingdate_begin").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- filter_waitingdate_end.set('minDate', selectedDates[0]); >- } >- }); >- var filter_waitingdate_end = $("#filter_waitingdate_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var filter_cancellationdate_begin = $("#filter_cancellationdate_begin").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- filter_cancellationdate_end.set('minDate', selectedDates[0]); >- } >- }); >- var filter_cancellationdate_end = $("#filter_cancellationdate_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- }); >- </script> > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29240
:
126259
|
126286
|
126293
|
126294
|
126295
|
126301
|
126309
|
126341
|
126342
|
126343
|
126472
|
126493
|
126494
|
126495