Bug 24786: Allow setting a register for the session
commit5b1934312b87f8458de84d96421106774dbd95a8
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 20 Jul 2020 15:14:17 +0000 (20 16:14 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Nov 2020 14:39:59 +0000 (6 15:39 +0100)
tree29023b82353f5d4a5248dc0e3b8c5b312b27458d
parent3e1e9ddfcb7063e02ec0384d35ddb485ac3292de
Bug 24786: Allow setting a register for the session

This patch adds the ability to set a register for the current session
from the 'set library' page.

Upon entering the page, the current selection will be displayed.
Changing the branch will trigger the register select list to update to
display only those registers associated with the updated branch and will
automatically select either 'no register' or the 'branch default'
register.  The user can then override that selection to choose a
different register for the session.

Test plan
1/ Enable cash registers with the 'UseCashRegisters' system preference
2/ Select the 'Set library' option from the top right menu
3/ Note that you can now select a cash register from the subsequent page
4/ Change the branch and note that the cash register selection is
updated to reflect the change
5/ Note that the 'branch default' register is auto-selected upon branch
selection if one has been defined, otherwise '-- None --' is selected
6/ You can then alter the selection before submitting the form
7/ Once submitted note that you are returned to the page you were on
prior to attempting to change the library and register
8/ Note the present of the register name next to the library name at the
top of the screen.
9/ Signoff

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Auth.pm
C4/Context.pm
Koha/Template/Plugin/Registers.pm [new file with mode: 0644]
circ/set-library.pl
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt