Make deactivation of card optional
authorJeff Godin <jgodin@tadl.org>
Tue, 25 Jun 2013 20:03:49 +0000 (16:03 -0400)
committerJeff Godin <jgodin@tadl.org>
Tue, 7 Apr 2015 15:20:22 +0000 (11:20 -0400)
Make deactivation of current card optional when using Replace
Barcode function.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/js/ui/default/actor/user/register.js

index ced646f..3594ca3 100644 (file)
@@ -575,8 +575,12 @@ function replaceCardHandler() {
     // 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();