LP#1356477: teach webstaff patron editor about staged user settings
authorGalen Charlton <gmc@esilibrary.com>
Wed, 3 Aug 2016 19:36:18 +0000 (15:36 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 21:58:34 +0000 (17:58 -0400)
This patch also fixes a bug that preferred the webstaff patron editor
from successfully removing a staged patron upon completing the
registration of the patron.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index d08d699..1005453 100644 (file)
@@ -791,6 +791,10 @@ angular.module('egCoreMod')
             if (user.usrname == '') 
                 user.usrname = card.barcode;
         }
+
+        angular.forEach(cuser.settings, function(setting) {
+            service.user_settings[setting.setting()] = Boolean(setting.value());
+        });
     }
 
     // copy select values from the cloned user to the new user.
@@ -1008,7 +1012,7 @@ angular.module('egCoreMod')
             'open-ils.actor',
             'open-ils.actor.user.stage.delete',
             egCore.auth.token(),
-            service.stage_user.row_id()
+            service.stage_user.user.row_id()
         );
     }