mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
autofilled fields do not trigger model update, do it manually
This commit is contained in:
@@ -1460,7 +1460,8 @@ module.controller('MetricsCtrl', ['$scope', 'AdminMetricsService', function($sco
|
||||
$scope.metrics = AdminMetricsService.get();
|
||||
}]);
|
||||
|
||||
module.controller('LoginCtrl', ['$scope', '$location', 'SessionService', 'ServerService', function($scope, $location, SessionService, ServerService) {
|
||||
module.controller('LoginCtrl', ['$scope', '$location', '$timeout', 'SessionService', 'ServerService',
|
||||
function($scope, $location, $timeout, SessionService, ServerService) {
|
||||
$scope.model = {};
|
||||
$scope.recovery_model = {};
|
||||
$scope.recovery = false;
|
||||
@@ -1470,6 +1471,11 @@ module.controller('LoginCtrl', ['$scope', '$location', 'SessionService', 'Server
|
||||
$scope.recovery_enabled = data.smtpEnabled;
|
||||
});
|
||||
|
||||
// autofilled fields do not trigger model update, do it manually
|
||||
$timeout(function() {
|
||||
$('input[ng-model]').trigger('input');
|
||||
}, 100);
|
||||
|
||||
var login = function(model) {
|
||||
var success = function(data) {
|
||||
window.location.href = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
|
||||
@@ -1508,7 +1514,7 @@ module.controller('LoginCtrl', ['$scope', '$location', 'SessionService', 'Server
|
||||
email : $scope.recovery_model.email
|
||||
}, recovery_success, recovery_error);
|
||||
}
|
||||
}]);
|
||||
}]);
|
||||
|
||||
module.controller('RegisterCtrl', ['$scope', '$location', 'SessionService', 'ServerService',
|
||||
function($scope, $location, SessionService, ServerService) {
|
||||
|
||||
Reference in New Issue
Block a user