Bugzilla – Attachment 153105 Details for
Bug 28805
Add on-site option to batch checkout functionality
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28805: Add on-site checkout checkbox in batch checkout
Bug-28805-Add-on-site-checkout-checkbox-in-batch-c.patch (text/plain), 5.09 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-07-06 19:21:15 UTC
(
hide
)
Description:
Bug 28805: Add on-site checkout checkbox in batch checkout
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-07-06 19:21:15 UTC
Size:
5.09 KB
patch
obsolete
>From 5c37eeafa98181c7f520bc4dda1a8d60ed76c4b8 Mon Sep 17 00:00:00 2001 >From: Fabricio Molina <fabriciomolina@theke.io> >Date: Mon, 3 Jul 2023 14:55:59 +0000 >Subject: [PATCH] Bug 28805: Add on-site checkout checkbox in batch checkout >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Add the 'on-site checkout' checkbox to the 'Batch checkout'. To verify the functionality, follow these steps: > > 1) Before the modification is added, enable the 'OnSiteCheckouts' and 'BatchCheckout' system preferences. > 2) In the 'BatchCheckoutsValidCategories' preference, select all categories. > 3) Find a user in the system. For example, Henry Acevedo. > 4) In the 'Check out' section, you can see that the 'Checkout settings' option displays the 'On-site Checkout' checkbox when clicked. > 5) Check the 'On-site checkout' option. This will display the current date with a runtime deadline of 23:59. > 6) Enter a barcode (for example 39999000011418). > 7) Click the 'Check out' button. This will show that the loan was made on-site. > 8) Check the 'Batch checkout' section. This section does not hace the 'On-site checkout' checkbox. > >When loading the patch with the addition of the 'on-site checkout' checkbox in 'Batch checkout' starting from step 3), you can already find the checkbox in the 'Batch checkout' section. To use it, you can try the barcodes 39999000006179 and 39999000008494 together. Then continue from step 5). > >When viewing the loans, you will see that both items (39999000006179 and 39999000008494) will appear with the label 'On-site checkout'. > >If this patch is deactivated, the functionality will remain the same as it was before this change. > >Sponsored-by: Banco Central de la República Argentina >--- > .../circ/circulation_batch_checkouts.tt | 42 +++++++++++++++---- > 1 file changed, 35 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index f5396da1bae..60b2e96083e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -99,15 +99,30 @@ > </li> > </ol> > </fieldset> >- [% IF Koha.Preference('SpecifyDueDate') %] >- <fieldset class="rows"> >- <legend>Due date: </legend> >- <label for="duedatespec">Hard due date [% INCLUDE 'date-format.inc' %]:</label> >- <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> >- </fieldset> >- [% END %] >+ [% IF Koha.Preference('SpecifyDueDate') && Koha.Preference('OnSiteCheckouts') %] >+ <fieldset class="rows"> >+ <legend>Due date:</legend> >+ <label for="duedatespec">Hard due date: [% INCLUDE 'date-format.inc' %]:</label> >+ <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" class="flatpickr" data-flatpickr-enable-time="true"/> >+ <div id="onsite_checkout-select" class="circ-setting"> >+ <div class="circ-setting"> >+ <label for="onsite_checkout">On-site checkout:</label> >+ <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting"/> >+ </div> >+ </div> >+ </fieldset> >+ >+ [% ELSIF Koha.Preference('SpecifyDueDate') %] >+ <fieldset class="rows"> >+ <legend>Due date:</legend> >+ <label for="duedatespec">Hard due date [% INCLUDE 'date-format.inc' %]:</label> >+ <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> >+ </fieldset> >+ [% END %] >+ > <input type="hidden" name="op" value="show" /> > </fieldset> >+ > <fieldset class="action"> > <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" /> > <input type="hidden" name="branch" value="[% branch | html %]" /> >@@ -331,6 +346,8 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >+ [% Asset.js("js/members-menu.js") | $raw %] >+ [% Asset.js("js/pages/circulation.js") | $raw %] > <script> > $(document).ready(function() { > if($('#barcodelist').length) { >@@ -348,6 +365,17 @@ > "bPaginate": false > })); > }); >+ // On-site batch checkout >+ function toggle_onsite_checkout(){ >+ if ( $("#onsite_checkout").prop('checked') ) { >+ const duedatespec_fp = document.querySelector("#duedatespec")._flatpickr; >+ duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]"); >+ }; >+ }; >+ >+ $("#onsite_checkout").click(function(){ >+ toggle_onsite_checkout(); >+ }); > > </script> > [% INCLUDE 'str/members-menu.inc' %] >-- >2.41.0
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 28805
:
152992
|
153105
|
153185
|
154346
|
156182
|
156183
|
156184
|
158108
|
158279
|
158386