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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2021-10-14 17:05:07 +00:00 committed by Jonathan Druart
parent 30196fcdf3
commit f3d0c08ce5
7 changed files with 44 additions and 233 deletions

View File

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

View File

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

View File

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

View File

@ -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();
});

View File

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

View File

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

View File

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