Browse Source

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>
21.11.x
Martin Renvoize 3 years ago
committed by Jonathan Druart
parent
commit
30196fcdf3
  1. 19
      koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
  2. 4
      koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc
  3. 30
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
  4. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
  5. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
  6. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt
  7. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt
  8. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
  9. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
  10. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt
  11. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
  12. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tt
  13. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
  14. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
  15. 35
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt
  16. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt
  17. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
  18. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
  19. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
  20. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
  21. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt
  22. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt
  23. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt
  24. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt
  25. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt
  26. 4
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
  27. 26
      koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js

19
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 %]

4
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>

30
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 %]

4
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>

8
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>

4
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> &nbsp;
<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> &nbsp;
<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>

4
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>

4
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>

4
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)

4
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>

8
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>

4
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>

6
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>

4
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>

35
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' %]

4
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>

4
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 %]

4
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>

4
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>

4
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>

4
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>

4
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>

4
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' %]

4
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>

4
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>

4
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>

26
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');

Loading…
Cancel
Save