fix(login(js)): input focus on TOTP field

This commit is contained in:
Francis Lachapelle
2021-12-07 16:31:28 -05:00
parent 4eed98d58d
commit 56a6f246d6
2 changed files with 8 additions and 3 deletions
+3 -2
View File
@@ -9,8 +9,8 @@
/**
* @ngInject
*/
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication'];
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication) {
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication', 'sgFocus'];
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication, focus) {
var vm = this;
this.$onInit = function() {
@@ -43,6 +43,7 @@
if (data.totpmissingkey) {
vm.loginState = 'totpcode';
focus('totpcode');
}
else if (data.totpdisabled) {
vm.loginState = 'totpdisabled';