Make deactivation of current card optional when using Replace
Barcode function.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
// pull old card off the cards list so we don't have a dupe sitting in there
if (patron.cards().length > 0) {
var old = patron.cards().filter(function(c){return (c.id() == patron.card().id())})[0];
- old.active('f');
- old.ischanged(1);
+ /* TADL Customization */
+ var deactivate = confirm('Deactivate the original card?');
+ if (deactivate) {
+ old.active('f');
+ old.ischanged(1);
+ }
}
var newc = new fieldmapper.ac();