From: Bill Erickson Date: Thu, 17 Mar 2016 20:34:02 +0000 (-0400) Subject: JBAS-1132 Save (Clone) from staged users repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3bb027139f3a16979beb5bc9cb9d7de845134e5b;p=working%2FEvergreen.git JBAS-1132 Save (Clone) from staged users repairs * Avoid trying to re-register the same staged patron after saving a staged patron and reloading the form. * Avoid trying to remove a staged patron from the pending user grid if the patron row has already been removed. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index a138930c67..47faa5282d 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -2285,6 +2285,9 @@ function uEditRemoveStage() { function uEditFinishSave(newPatron, doClone) { + if (xulG && xulG.params) + delete xulG.params.stage; // don't try to re-register + if(doClone && cloneUser == null) cloneUser = newPatron.id(); diff --git a/Open-ILS/xul/staff_client/server/patron/staged.js b/Open-ILS/xul/staff_client/server/patron/staged.js index 7d1a6d8b7d..90d59b2c10 100644 --- a/Open-ILS/xul/staff_client/server/patron/staged.js +++ b/Open-ILS/xul/staff_client/server/patron/staged.js @@ -201,6 +201,9 @@ function load( usrnames ) { function gen_on_save_handler(usrname) { return function() { try { + // avoid trying to remove the staged user twice. + if (!rows[usrname]) return; + var node = rows[ usrname ].treeitem_node; var parentNode = node.parentNode; parentNode.removeChild( node );