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>