change the xulG tests to fix Save & Clone for new patrons
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Jun 2010 17:54:40 +0000 (17:54 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Jun 2010 17:54:40 +0000 (17:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16654 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/actor/user/register.js

index a665699..1979f91 100644 (file)
@@ -58,17 +58,17 @@ function load() {
 
     if(xulG) {
            if(xulG.ses) openils.User.authtoken = xulG.ses;
-           if(xulG.clone !== null) cloneUser = xulG.clone;
-        if(xulG.usr !== null) userId = xulG.usr
-        if(xulG.params) {
+           if(typeof xulG.clone != 'undefined') cloneUser = xulG.clone;
+        if(typeof xulG.usr != 'undefined') userId = xulG.usr
+        if(typeof xulG.params != 'undefined') {
             var parms = xulG.params;
-               if(parms.ses
+               if(typeof parms.ses != 'undefined'
                 openils.User.authtoken = parms.ses;
-               if(parms.clone
+               if(typeof parms.clone != 'undefined'
                 cloneUser = parms.clone;
-            if(parms.usr !== null)
+            if(typeof parms.usr != 'undefined')
                 userId = parms.usr;
-            if(parms.stage !== null)
+            if(typeof parms.stage != 'undefined')
                 stageUname = parms.stage
         }
     }