]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Active/Primary Editing for Patron Cards
authorThomas Berezansky <tsbere@mvlc.org>
Tue, 1 Nov 2011 13:18:47 +0000 (09:18 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 1 Dec 2011 20:59:15 +0000 (15:59 -0500)
commit8d0168013b8281c3e10ecbc78c4b45fdf92760f9
tree67ff02e09b105db264701677418da5b9974989f6
parent7ab686868965f22323a330f119be950c0db7bd76
Active/Primary Editing for Patron Cards

Changes "See All" into an editing interface, allowing for changing of the
active and primary state of each card.

Each requires a specific permission:

UPDATE_PATRON_ACTIVE_CARD
UPDATE_PATRON_PRIMARY_CARD

Without the appropriate permission the interface will show the green check
or red x instead of the editing elements. If you don't have either
permission then the Apply Changes button is hidden.

As the editing interface exists, also show the "See All" button when there
is only one card, but not when registering a new patron. This allows for
toggling the lone card's active flag, as well as replacing a card but
leaving the old one active.

To ensure that you can do the above, and to avoid some other errors, the
new card on a patron is saved to the editCard variable, rather than using
patron.card(). This both allows for "Replacing" a new non-primary card into
place as well as avoiding issues with editing the primary and active states
at the same time (the interface would try and update the new primary card
with the old primary card's barcode). Also, when checking for duplicate
barcodes, update the editCard with the barcode so the See All interface can
show the new card's barcode in the list properly.

Finally, included is localization for the All Cards interface headers and
buttons.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/templates/actor/user/register.tt2
Open-ILS/src/templates/actor/user/register_table.tt2
Open-ILS/web/js/dojo/openils/actor/nls/register.js
Open-ILS/web/js/ui/default/actor/user/register.js