Bugzilla – Attachment 126493 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: Centralise from/to handling
Bug-29240-Centralise-fromto-handling.patch (text/plain), 43.46 KB, created by
Jonathan Druart
on 2021-10-19 12:08:56 UTC
(
hide
)
Description:
Bug 29240: Centralise from/to handling
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-19 12:08:56 UTC
Size:
43.46 KB
patch
obsolete
>From 30196fcdf3f5d726ad79c4f8983b17e9ad06b46a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 14 Oct 2021 15:06:30 +0100 >Subject: [PATCH] Bug 29240: Centralise from/to handling > >This patch moves to using a data-start_for attribute to point the 'from' >flatpickr to the 'to' flatpickr. > >We also fix the date validation issue in the onClose handler inline. > >Test plan. >1. Check that the from/to datpicker combinations work on each of the > changed pages. >2. Look at the console for errors, there should be none > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/includes/calendar.inc | 19 ++++------ > .../prog/en/includes/filter-orders.inc | 4 +-- > .../prog/en/modules/acqui/invoices.tt | 30 +++------------- > .../prog/en/modules/acqui/lateorders.tt | 4 +-- > .../prog/en/modules/admin/aqbudgetperiods.tt | 8 ++--- > .../prog/en/modules/admin/aqcontract.tt | 4 +-- > .../prog/en/modules/circ/overdue.tt | 4 +-- > .../prog/en/modules/circ/pendingreserves.tt | 4 +-- > .../prog/en/modules/circ/reserveratios.tt | 4 +-- > .../prog/en/modules/clubs/clubs-add-modify.tt | 4 +-- > .../prog/en/modules/ill/ill-requests.tt | 8 ++--- > .../prog/en/modules/labels/search.tt | 4 +-- > .../prog/en/modules/members/memberentrygen.tt | 6 ++-- > .../prog/en/modules/pos/register.tt | 4 +-- > .../en/modules/reports/acquisitions_stats.tt | 35 +++---------------- > .../en/modules/reports/cash_register_stats.tt | 4 +-- > .../prog/en/modules/reports/dictionary.tt | 4 +-- > .../prog/en/modules/reports/issues_stats.tt | 4 +-- > .../prog/en/modules/serials/claims.tt | 4 +-- > .../en/modules/serials/subscription-add.tt | 4 +-- > .../modules/serials/subscription-history.tt | 4 +-- > .../prog/en/modules/tags/review.tt | 4 +-- > .../en/modules/tools/additional-contents.tt | 4 +-- > .../modules/tools/batch_extend_due_dates.tt | 4 +-- > .../prog/en/modules/tools/export.tt | 4 +-- > .../prog/en/modules/tools/viewlog.tt | 4 +-- > .../intranet-tmpl/prog/js/ill-list-table.js | 26 -------------- > 27 files changed, 65 insertions(+), 147 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index aef5938d8e1..3002796e24e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -58,23 +58,16 @@ > }); > }, > onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >+ validate_date( dateText, instance ); >+ var thisInput = instance.input; >+ if ( thisInput.hasAttribute('data-start_for') ) { >+ var endPicker = document.querySelector("#"+thisInput.dataset.start_for)._flatpickr; >+ endPicker.set('minDate', selectedDates[0]); >+ } > }, > }); > $(document).ready(function(){ > $(".flatpickr").flatpickr(); >- var startPicker = $(".flatpickrfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- endPicker.set('minDate', selectedDates[0]); >- } >- }); >- var endPicker = $(".flatpickrto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >index ef8e38496d4..efc1bc0f302 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >@@ -103,11 +103,11 @@ > </li> > > <li><label for="from">From: </label> >- <input type="text" size="10" id="from" name="from" value="[% filters.from_placed_on | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="from" value="[% filters.from_placed_on | $KohaDates %]" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li><label for="to">To: </label> >- <input type="text" size="10" id="to" name="to" value="[% filters.to_placed_on | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="to" value="[% filters.to_placed_on | $KohaDates %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 79c3942f301..7ff7b0e3aed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -297,12 +297,12 @@ > <ol> > <li> > <label for="shipmentdatefrom">From:</label> >- <input type="text" id="shipmentdatefrom" name="shipmentdatefrom" size="10" value="[% shipmentdatefrom | $KohaDates %]" /> >+ <input type="text" id="shipmentdatefrom" name="shipmentdatefrom" size="10" value="[% shipmentdatefrom | $KohaDates %]" class="flatpickr" data-start_for="shipmentdateto" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > <label for="shipmentdateto">To:</label> >- <input type="text" id="shipmentdateto" name="shipmentdateto" size="10" value="[% shipmentdateto | $KohaDates %]" /> >+ <input type="text" id="shipmentdateto" name="shipmentdateto" size="10" value="[% shipmentdateto | $KohaDates %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >@@ -314,12 +314,12 @@ > <ol> > <li> > <label for="billingdatefrom">From:</label> >- <input type="text" id="billingdatefrom" name="billingdatefrom" size="10" value="[% billingdatefrom | $KohaDates %]" /> >+ <input type="text" id="billingdatefrom" name="billingdatefrom" size="10" value="[% billingdatefrom | $KohaDates %]" class="flatpickr" data-start_for="billingdateto" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > <label for="billingdateto">To:</label> >- <input type="text" id="billingdateto" name="billingdateto" size="10" value="[% billingdateto | $KohaDates %]" /> >+ <input type="text" id="billingdateto" name="billingdateto" size="10" value="[% billingdateto | $KohaDates %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >@@ -459,28 +459,6 @@ > $('#merge_invoices').show(); > } > }); >- var shipmentdatefrom = $("#shipmentdatefrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- shipmentdateto.set('minDate', selectedDates[0]); >- } >- }); >- var shipmentdateto = $("#shipmentdateto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- var billingdatefrom = $("#billingdatefrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- billingdateto.set('minDate', selectedDates[0]); >- } >- }); >- var billingdateto = $("#billingdateto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index c4847c145c0..6740629bd2b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -232,11 +232,11 @@ > <ol> > <li><label for="delay">Order date:</label><input size="3" maxlength="3" id="delay" type="text" name="delay" value="[% delay | html %]" /> days ago</li> > <li><label for="from">Estimated delivery date from: </label> >- <input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom | html %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="estimateddeliverydatefrom" value="[% estimateddeliverydatefrom | html %]" class="flatpickr" data-start_for="to"/> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li><label for="to">To: </label> >- <input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto | html %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="estimateddeliverydateto" value="[% estimateddeliverydateto | html %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >index f2149b50dd1..85acd8de7c0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >@@ -189,14 +189,14 @@ > > <li> > <label class="required" for="from">Start date: </label> >- <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="flatpickr" data-start_for="to" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > > <label class="required" for="to">End date: </label> >- <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="flatpickr" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> >@@ -259,14 +259,14 @@ > <ol> > <li> > <label class="required" for="from">Start date: </label> >- <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="flatpickr" data-start_for="to" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > > <label class="required" for="to">End date: </label> >- <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate | $KohaDates %]" class="flatpickr" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >index 1eee60f12df..c2803450684 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt >@@ -132,12 +132,12 @@ > <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription | html %]" /> > </li> > <li><label for="from" class="required">Start date:</label> >- <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="flatpickrfrom" /> >+ <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="flatpickr" data-start_for="to" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li><label for="to" class="required">End date:</label> >- <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="flatpickrto" /> >+ <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="flatpickr" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index d1ecdca234e..9e6077d0668 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -156,11 +156,11 @@ > > <li class="date_due_filter"> > <label for="from">From:</label> >- <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="flatpickr" data-start_for="to" /> > </li> > <li class="date_due_filter"> > <label for="to">To:</label> >- <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="flatpickr" /> > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index a8dd7f45395..8e0642f674a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -271,12 +271,12 @@ > <label for="from"> > Start date: > </label> >-<input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickrfrom" /> >+<input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickr" data-start_for="to" /> > </li> > <li><label for="to"> > End date: > </label> >-<input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="flatpickrto" /> >+<input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="flatpickr" /> > </li> > </ol> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index 2a11966fa0b..94dcd4ad68e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -164,12 +164,12 @@ > > <li> > <label for="from">Start date:</label> >- <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickr" data-start_for="to" /> > </li> > > <li> > <label for="to">End date:</label> >- <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="flatpickrto" /> >+ <input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="flatpickr" /> > </li> > </ol> > (inclusive) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >index 6a2b51a1845..18e58f5fafa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt >@@ -73,12 +73,12 @@ > > <li> > <label for="from">Start date:</label> >- <input name="date_start" id="from" size="10" class="flatpickrfrom" value="[% club.date_start | $KohaDates %]"> >+ <input name="date_start" id="from" size="10" class="flatpickr" data-start_for="to" value="[% club.date_start | $KohaDates %]"> > </li> > > <li> > <label for="to">End date:</label> >- <input name="date_end" id="to" size="10" class="flatpickrto" value="[% club.date_end | $KohaDates %]" > >+ <input name="date_end" id="to" size="10" class="flatpickr" value="[% club.date_end | $KohaDates %]" > > </li> > > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index fb5a645dc7a..dea023627be 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -73,19 +73,19 @@ > </li> > <li> > <label for="illfilter_dateplaced_start">Date placed between:</label> >- <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" /> >+ <input type="text" name="illfilter_dateplaced_start" id="illfilter_dateplaced_start" class="flatpickr" data-start_for="illfilter_dateplaced_end"/> > </li> > <li> > <label for="illfilter_dateplaced_end">and:</label> >- <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" /> >+ <input type="text" name="illfilter_dateplaced_end" id="illfilter_dateplaced_end" class="flatpickr" /> > </li> > <li> > <label for="illfilter_datemodified_start">Updated between:</label> >- <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" /> >+ <input type="text" name="illfilter_datemodified_start" id="illfilter_datemodified_start" class="flatpickr" data-start_for="illfilter_datemodified_end" /> > </li> > <li> > <label for="illfilter_datemodified_end">and:</label> >- <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" /> >+ <input type="text" name="illfilter_datemodified_end" id="illfilter_datemodified_end" class="flatpickr" /> > </li> > <li> > <label for="illfilter_branchname">Library:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >index aee3f2ffc77..a3e2a05f892 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt >@@ -90,12 +90,12 @@ to add to Batch [% batch_id | html %] > <ol> > <li> > <label for="from">Added on or after date: </label> >- <input type="text" size="10" id="from" name="datefrom" class="flatpickrfrom" value="" /> >+ <input type="text" size="10" id="from" name="datefrom" class="flatpickr" data-start_for="to" value="" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > <label for="to">Added on or before date: </label> >- <input type="text" size="10" id="to" name="dateto" class="flatpickrto" value="" /> >+ <input type="text" size="10" id="to" name="dateto" class="flatpickr" value="" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 451ffaeee51..6450d5f1a4e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1055,7 +1055,7 @@ legend:hover { > [% END %] > Registration date: > </label> >- <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="flatpickrfrom" /> >+ <input type="text" id="from" name="dateenrolled" maxlength="10" size="10" value="[% dateenrolled | html %]" class="flatpickr" data-start_for="to" /> > [% IF ( mandatorydateenrolled ) %] > <span class="required">Required</span> > [% END %] >@@ -1079,9 +1079,9 @@ legend:hover { > Expiry date (leave blank for auto calc): > </label> > [% UNLESS ( opadd ) %] >- <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="flatpickrto" /> >+ <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html UNLESS opduplicate %]" class="flatpickr" /> > [% ELSE %] >- <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="flatpickrto" /> >+ <input type="text" id="to" name="dateexpiry" maxlength="10" size="10" value="[% dateexpiry | html %]" class="flatpickr" /> > [% END %] > [% IF ( mandatorydateexpiry ) %] > <span class="required">Required</span> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index effc2c9591e..b9ef85e550a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -163,9 +163,9 @@ > <ol> > <li> > <label for="trange_f">From: </label> >- <input type="text" size="10" id="from" class="flatpickrfrom" name="trange_f" value="[% trange_f | html %]"/> >+ <input type="text" size="10" id="from" class="flatpickr" data-start_for="to" name="trange_f" value="[% trange_f | html %]"/> > <label class="inline" for="trange_t">To: </label> >- <input type="text" size="10" id="to" class="flatpickrto" name="trange_t" value="[% trange_t | html %]" /> >+ <input type="text" size="10" id="to" class="flatpickr" name="trange_t" value="[% trange_t | html %]" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >index 2f9dee8e430..1a9667c4ab1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >@@ -120,9 +120,9 @@ > <td><input type="radio" name="Line" value="aqbasket.closedate" /></td> > <td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td> > <td> >- From <input type="text" size="10" id="placedonfrom" name="Filter" value="" /> >+ From <input type="text" size="10" id="placedonfrom" name="Filter" value="" class="flatpickr" data-start_for="placedonto" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> >- To <input size="10" id="placedonto" name="Filter" type="text" value="" /> >+ To <input size="10" id="placedonto" name="Filter" type="text" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -143,9 +143,9 @@ > <td><input type="radio" name="Line" value="aqorders.datereceived" /></td> > <td><input type="radio" name="Column" value="aqorders.datereceived" /></td> > <td> >- From <input type="text" size="10" id="receivedonfrom" name="Filter" value="" /> >+ From <input type="text" size="10" id="receivedonfrom" name="Filter" value="" class="flatpickr" data-start_for="receivedonto" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> >- To <input type="text" size="10" id="receivedonto" name="Filter" value="" /> >+ To <input type="text" size="10" id="receivedonto" name="Filter" value="" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >@@ -339,33 +339,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] >- <script> >- $(document).ready(function() { >- var placedonfrom = $("#placedonfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- placedonto.set('minDate', selectedDates[0]); >- } >- }); >- var placedonto = $("#placedonto").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var receivedonfrom = $("#receivedonfrom").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- receivedonto.set('minDate', selectedDates[0]); >- } >- }); >- var receivedonto = $("#receivedonto").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/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >index d2f54f421c1..2017b58fb1f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >@@ -58,12 +58,12 @@ > <br> > <li> > <label for="from">From: </label> >- <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > <label for="to">To: </label> >- <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt >index fd1bd3e2231..349e1b2e888 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt >@@ -259,10 +259,10 @@ > </li> > <li class="radio"> > Start of date range >- <input type="text" size="10" id="from" name="[% column.name | html %]_start_value" value="" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="[% column.name | html %]_start_value" value="" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > End of date range >- <input type="text" size="10" id="to" name="[% column.name | html %]_end_value" value="" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="[% column.name | html %]_end_value" value="" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >index 37742acec81..3589e5f1c79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >@@ -128,9 +128,9 @@ > <td><input type="radio" name="Column" value="datetime" /></td> > <td> > <label for="from">From</label> >- <input type="text" size="10" id="from" name="Filter" class="flatpickrfrom" /> >+ <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="flatpickrto" /> >+ <input size="10" id="to" name="Filter" value="" type="text" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > </td> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index cab4dc9eda3..b79903386ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -93,9 +93,9 @@ > <ol> > <li> > <label for="from">From:</label> >- <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="flatpickrfrom" /> >+ <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="flatpickr" data-start_for="to"/> > <label for="to" style="float:none;">To:</label> >- <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="flatpickrto" /> >+ <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="flatpickr" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > <input id="filterByDate" type="button" value="OK" /> > <a href="#" id="clearfilter"><i class="fa fa-remove"></i> Clear filter</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 5de924a268f..7f1f7641e80 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -327,11 +327,11 @@ fieldset.rows table { clear: none; margin: 0; } > </li> > <li> > <label for="from" class="required"> Subscription start date:</label> >- <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="flatpickrfrom required" required="required" /> >+ <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="flatpickr required" data-start_for="to" required="required" /> > </li> > <li> > <label for="to">Subscription end date:</label> >- <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="flatpickr" /> > </li> > <li> > <label for="numberpattern" class="required">Numbering pattern:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >index 56827085ac4..f90fdb18d44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >@@ -41,14 +41,14 @@ > <tr> > <td>Subscription start date</td> > <td> >- <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="flatpickrfrom" /> (start date of the 1st subscription) >+ <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="flatpickr" data-start_for="histenddate" /> (start date of the 1st subscription) > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </td> > </tr> > <tr> > <td>Subscription end date</td> > <td> >- <input type="text" size="10" name="histenddate" value="[% histenddate | $KohaDates %]" class="flatpickrto" />(if empty, subscription is still active) >+ <input type="text" size="10" id="histenddate" name="histenddate" value="[% histenddate | $KohaDates %]" class="flatpickr" />(if empty, subscription is still active) > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </td> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >index 31bad4581eb..7a2de0ad16b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >@@ -230,11 +230,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > </li> > <li> > <label for="from">Date: from </label> >- <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="from" value="[% filter_date_approved_from | html %]" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > > <label for="to">...to </label> >- <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="to" value="[% filter_date_approved_to | html %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index 9958807cd5c..a867c70e928 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -214,12 +214,12 @@ > [% END %] > <li> > <label for="from">Publication date: </label> >- <input id="from" type="text" name="published_on" size="15" value="[% additional_content.published_on | $KohaDates %]" class="flatpickrfrom" /> >+ <input id="from" type="text" name="published_on" size="15" value="[% additional_content.published_on | $KohaDates %]" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> > <label for="to">Expiration date: </label> >- <input id="to" type="text" name="expirationdate" size="15" value="[% additional_content.expirationdate | $KohaDates %]" class="flatpickrto" /> >+ <input id="to" type="text" name="expirationdate" size="15" value="[% additional_content.expirationdate | $KohaDates %]" class="flatpickr" /> > <div class="hint"> > [% INCLUDE 'date-format.inc' %] > [% IF category == 'news' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >index 1fed15f83a0..b4f0f345c44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >@@ -82,12 +82,12 @@ > > <li> > <label for="from_due_date">Due date from: </label> >- <input type="text" size="10" id="from" name="from_due_date" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="from_due_date" class="flatpickr" data-start_for="to" /> > </li> > > <li> > <label for="to_due_date">Due date to:</label> >- <input type="text" size="10" id="to" name="to_due_date" class="flatpickrto" /> >+ <input type="text" size="10" id="to" name="to_due_date" class="flatpickr" /> > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >index fe5011bd9b4..bdf9b3586cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt >@@ -110,11 +110,11 @@ > <ol> > <li> > <label for="from">Start date:</label> >- <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickrfrom" /> >+ <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-start_for="to" /> > </li> > <li> > <label for="to">End date:</label> >- <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickrto" /> >+ <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" /> > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index a1794b0e75e..27b33a5c262 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -273,11 +273,11 @@ > [% END %] > </li> > <li> >- <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="flatpickrfrom" /> >+ <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="flatpickr" data-start_for="to" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> >- <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto | html %]" class="flatpickrto" /> >+ <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto | html %]" class="flatpickr" /> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 2c39ad7aba9..414bcf8f227 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -335,32 +335,6 @@ $(document).ready(function() { > $('#addcomment').toggleClass('content_hidden'); > }); > >- var illfilter_dateplaced_start = $("#illfilter_dateplaced_start").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- illfilter_dateplaced_end.set('minDate', selectedDates[0]); >- } >- }); >- >- var illfilter_dateplaced_end = $("#illfilter_dateplaced_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- var illfilter_datemodified_start = $("#illfilter_datemodified_start").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- illfilter_datemodified_end.set('minDate', selectedDates[0]); >- } >- }); >- >- var illfilter_datemodified_end = $("#illfilter_datemodified_end").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- > // Filter partner list > // Record the list of all options > var ill_partner_options = $('#partners > option'); >-- >2.25.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