FF login repairs
authorBill Erickson <berick@esilibrary.com>
Sun, 4 May 2014 19:55:30 +0000 (15:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Sun, 4 May 2014 19:55:30 +0000 (15:55 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/staff/app.js

index 8a1aef1..5087570 100644 (file)
@@ -77,9 +77,10 @@ angular.module('egHome', ['ngRoute', 'ui.bootstrap', 'egCoreMod', 'egUiMod'])
         })
 
         $scope.login = function(args) {
-            args.type = 'staff';
             $scope.loginFailed = false;
 
+            if (!args) args = {}; // see FF note below
+
             if (!args.username) {
                 /* 
                  Issues with form autofill / auto-complete                          
@@ -89,11 +90,11 @@ angular.module('egHome', ['ngRoute', 'ui.bootstrap', 'egCoreMod', 'egUiMod'])
                  honor them, even if it's hacky. */
                 args.username = document.getElementById("login-username").value;
                 args.password = document.getElementById("login-password").value;
-                args.workstation = document.getElementById("login-workstation").value;
             }
 
             if (! (args.username && args.password) ) return;
 
+            args.type = 'staff';
             egAuth.login(args).then(
 
                 function() {