Bugzilla – Attachment 166665 Details for
Bug 36844
Set library, desk, and cash register menu follow-ups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36844: Set library, desk, and cash register menu follow-ups
Bug-36844-Set-library-desk-and-cash-register-menu-.patch (text/plain), 6.17 KB, created by
Victor Grousset/tuxayo
on 2024-05-14 01:54:05 UTC
(
hide
)
Description:
Bug 36844: Set library, desk, and cash register menu follow-ups
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2024-05-14 01:54:05 UTC
Size:
6.17 KB
patch
obsolete
>From 928293258f93a85491e45f0777d4c68ace2a9d05 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 13 May 2024 16:53:39 +0000 >Subject: [PATCH] Bug 36844: Set library, desk, and cash register menu > follow-ups > >This patch ties up a couple of loose ends which should have been >included in Bug 36582. The patch includes fixes for the staff interface >login page and the cash register statistics page. > >To test you should have multiple libraries, desks, and cash registers >defined. You may need to enable the UseCirculationDesks and >UseCashRegisters system preferences. > >- Apply the patch and log out of the staff interface. >- On the login form, test that changing your selected library correctly > affects the desk and cash register dropdowns: Only desks and registers > for your selected library should appear. >- Log in and confirm that your selections were submitted correctly. > >- Go to Reports, and under "Statistics wizards" choose "Cash register." >- Confirm that changes to the "Transaction library" correctly change the > available options in the "Cash register" dropdown, including the "All" > option. > >Sponsored-By: Athens County Public Libraries >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: David Nind <david@davidnind.com> >--- > .../intranet-tmpl/prog/en/modules/auth.tt | 16 ++++----- > .../en/modules/reports/cash_register_stats.tt | 36 ++++++++++++++----- > 2 files changed, 35 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >index 92eef3c9e0..51b1161a85 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt >@@ -144,11 +144,11 @@ > <p> > [% IF Koha.Preference('ForceLibrarySelection') %] > <label for="branch" class="required">Library:</label> >- <select name="branch" id="branch" class="input" tabindex="3" required="required"> >+ <select name="branch" id="set-library-branch" class="input" tabindex="3" required="required"> > <option value=""></option> > [% ELSE %] >- <label for="branch">Library:</label> >- <select name="branch" id="branch" class="input" tabindex="3"> >+ <label for="set-library-branch">Library:</label> >+ <select name="branch" id="set-library-branch" class="input" tabindex="3"> > <option value="">My library</option> > [% END %] > [% FOREACH l IN Branches.all( unfiltered => 1 ) %] >@@ -162,8 +162,8 @@ > > [% IF Koha.Preference('UseCirculationDesks') && Desks.all %] > <p> >- <label for="desk">Desk:</label> >- <select name="desk_id" id="desk_id" class="input" tabindex="3"> >+ <label for="set-library-desk_id">Desk:</label> >+ <select name="desk_id" id="set-library-desk_id" class="input" tabindex="3"> > <option id="nodesk" value="">---</option> > [% FOREACH d IN Desks.all %] > <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled >[% d.desk_name | html %]</option> >@@ -174,8 +174,8 @@ > > [% IF Koha.Preference('UseCashRegisters') && Registers.all().size %] > <p> >- <label for="register_id">Cash register:</label> >- <select name="register_id" id="register_id" class="input" tabindex="4"> >+ <label for="set-library-register_id">Cash register:</label> >+ <select name="register_id" id="set-library-register_id" class="input" tabindex="4"> > <option id="noregister" value="" selected="selected">Library default</option> > [% PROCESS options_for_registers registers => Registers.all() %] > </select> >@@ -255,8 +255,6 @@ > </div> > > [% MACRO jsinclude BLOCK %] >- [% Asset.js("js/desk_selection.js") | $raw %] >- [% Asset.js("js/register_selection.js") | $raw %] > <script> > $(document).ready( function() { > if ( document.location.hash ) { >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 327c38b184..b1faf8f09a 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 >@@ -222,21 +222,41 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >- [% Asset.js("js/register_selection.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >- <script id="js"> >+ [% INCLUDE 'calendar.inc' %] >+ <script> >+ actTotal = ""; > $(document).ready(function() { > $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, { > "pageLength": 50, > "pagingType": "full_numbers" > })); >- }); >- </script> >- [% INCLUDE 'calendar.inc' %] >- <script> >- actTotal = ""; > >- $(document).ready(function() { >+ $("#branch").on("change", function() { >+ var selectedBranch = $("#branch").children( >+ "option:selected").val(); >+ >+ $("#registerid").children().each(function() { >+ // default to no-register >+ if ($(this).is("#noregister")) { >+ $(this).prop("selected", true) >+ } >+ // display branch registers >+ else if ($(this).hasClass(selectedBranch)) { >+ $(this).prop("disabled", false); >+ $(this).show(); >+ // default to branch default if there is one >+ if ($(this).hasClass("default")) { >+ $(this).prop("selected", true) >+ } >+ } >+ // hide non-branch registers >+ else { >+ $(this).hide(); >+ $(this).prop("disabled", true); >+ } >+ }); >+ }); > > $('#frmCashRegister').submit(function() { > var isFormValid = true; >-- >2.45.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 36844
:
166651
|
166657
|
166662
|
166665
|
166666
|
166770
|
166771
|
166772