Add alert in user editor for method errors
authorJeff Godin <jgodin@tadl.org>
Wed, 30 Oct 2013 17:17:25 +0000 (13:17 -0400)
committerJeff Godin <jgodin@tadl.org>
Thu, 26 Dec 2013 19:10:22 +0000 (14:10 -0500)
Add an alert() in the user editor so that method errors are not
silent.

Without this, a method error (such as when saving a patron fails at
the db level) is silent. Better to at least inform the user that
something is amiss.

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

index 9db5b7f..c1e91b4 100644 (file)
@@ -1910,6 +1910,9 @@ function _uEditSave(doClone) {
                     if(stageUser) uEditRemoveStage();
                     uEditFinishSave(newPatron, doClone);
                 }
+            },
+            onmethoderror: function(req, status, status_text) {
+                alert("Method error: " + status + ": " + status_text);
             }
         }
     );