* 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 <berickxx@gmail.com>
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();
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 );