The input IDs are there to match the labels.
They are not referenced in the Login controller.
-->
- <form ng-submit="login(args)">
+ <form ng-submit="login(args)" name="login-form">
<div class="form-group row">
<label class="col-md-4 control-label" for="login-username">[% l('Username') %]</label>
<div class="col-md-8">
args.type = 'staff';
$scope.loginFailed = false;
+ if (!args.username) {
+ /*
+ Issues with form autofill / auto-complete
+ https://github.com/angular/angular.js/issues/1460
+ http://timothy.userapp.io/post/63412334209/form-autocomplete-and-remember-password-with-angularjs
+ For now, since FF will save the values, we should
+ 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;
+
egAuth.login(args).then(
+
function() {
// after login, send the user back to the originally
// requested page or, if none, the home page.