Bugzilla – Attachment 114438 Details for
Bug 8287
Improve filter on checked out from overdues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8287: Improve "show checked out items" filter on the overdues report
Bug-8287-Improve-show-checked-out-items-filter-on-.patch (text/plain), 4.61 KB, created by
Jonathan Druart
on 2020-12-16 14:32:44 UTC
(
hide
)
Description:
Bug 8287: Improve "show checked out items" filter on the overdues report
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-12-16 14:32:44 UTC
Size:
4.61 KB
patch
obsolete
>From 91535dcdd097ea550dec4c597ce014abd8a12cf6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Dec 2020 15:28:50 +0100 >Subject: [PATCH] Bug 8287: Improve "show checked out items" filter on the > overdues report > >The "Show any items currently checked out" was confusing, especially if >the "From" and "To" due date filters were passed. > >This patch moves the checkbox close to the 2 other filters and show/hide >the due date filters when needed. > >Test plan: >0. Have some overdue >1. Search for overdues >2. Confirm that the filters are shown/hidden depending on the status of >the checkbox >3. Fill "To" with a date, tick the checkbox, submit the form >=> Confirm that the date was not taken into account >--- > .../prog/en/modules/circ/overdue.tt | 56 +++++++++++++------ > 1 file changed, 39 insertions(+), 17 deletions(-) > >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 f5a32f2d1c..d4c90e5700 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -114,16 +114,27 @@ > <form method="post" action="/cgi-bin/koha/circ/overdue.pl"> > <fieldset class="brief"> > <h4>Filter on:</h4> >- <fieldset><legend>Date due:</legend> >- <ol> >- <li><label for="from">From:</label> >- <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="datepickerfrom" /> >- </li> >- <li> >- <label for="to">To:</label> >- <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="datepickerto" /> >- </li> >- </ol></fieldset> >+ <fieldset><legend>Date due:</legend> >+ <ol> >+ <li class="radio"> >+ <label for="showall">Show any items currently checked out:</label> >+ [% IF ( showall ) %] >+ <input type="checkbox" id="showall" name="showall" value="show" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" id="showall" name="showall" value="show" /> >+ [% END %] >+ </li> >+ >+ <li class="date_due_filter"> >+ <label for="from">From:</label> >+ <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="datepickerfrom" /> >+ </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="datepickerto" /> >+ </li> >+ </ol> >+ </fieldset> > <ol> > <li><label>Name or cardnumber:</label><input type="text" name="borname" value="[% filters.borname | html %]" /></li> > <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option> >@@ -132,6 +143,7 @@ > [% END %] > </select> > </li> >+ > <li><label>Patron flags:</label> > <select name="borflag" size="1" id="borflag"> > <option value="">None</option> >@@ -202,13 +214,6 @@ > </select> > </li> > >-<li class="radio"><label for="showall">Show any items currently checked out:</label> >- [% IF ( showall ) %] >- <input type="checkbox" id="showall" name="showall" value="show" checked="checked" /> >- [% ELSE %] >- <input type="checkbox" id="showall" name="showall" value="show" /> >- [% END %] >-</li> > </ol> > <fieldset class="action"> > <input type="submit" value="Apply filter" class="submit" /> >@@ -277,6 +282,18 @@ > }); > } > >+ function update_date_due_filters_visibility(){ >+ if( $("#showall").is(":checked")) { >+ $(".date_due_filter").hide(); >+ $("#from").prop("disabled", true); >+ $("#to").prop("disabled", true); >+ } else { >+ $(".date_due_filter").show(); >+ $("#from").prop("disabled", false); >+ $("#to").prop("disabled", false); >+ } >+ } >+ > $(document).ready(function(){ > var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %]; > KohaTable("overduest", { >@@ -285,6 +302,11 @@ > "autoWidth": false, > "stateSave": true > }, columns_settings); >+ >+ $("#showall").on("change", function(){ >+ update_date_due_filters_visibility(); >+ }); >+ update_date_due_filters_visibility(); > }); > </script> > [% END %] >-- >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 8287
:
114438
|
115335
|
116868