Add alert in user editor for method errors
authorJeff Godin <jgodin@tadl.org>
Wed, 30 Oct 2013 17:17:25 +0000 (13:17 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 9 Apr 2014 15:07:35 +0000 (11:07 -0400)
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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/actor/user/register.js

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