diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js index 94b550d704..6172f4170a 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js @@ -352,15 +352,14 @@ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serv function updateSupported() { if ($scope.realm.internationalizationEnabled) { - var accountLocales = localeForTheme('account', $scope.realm.loginTheme); - var adminLocales = localeForTheme('admin', $scope.realm.loginTheme); + var accountLocales = localeForTheme('account', $scope.realm.accountTheme); var loginLocales = localeForTheme('login', $scope.realm.loginTheme); - var emailLocales = localeForTheme('email', $scope.realm.loginTheme); + var emailLocales = localeForTheme('email', $scope.realm.emailTheme); var supportedLocales = []; for (var i = 0; i < accountLocales.length; i++) { var l = accountLocales[i]; - if (adminLocales.indexOf(l) >= 0 && loginLocales.indexOf(l) >= 0 && emailLocales.indexOf(l) >= 0) { + if (loginLocales.indexOf(l) >= 0 && emailLocales.indexOf(l) >= 0) { supportedLocales.push(l); } } @@ -371,7 +370,7 @@ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serv $scope.realm.supportedLocales = supportedLocales; } else { for (var i = 0; i < $scope.realm.supportedLocales.length; i++) { - if ($scope.realm.supportedLocales.indexOf($scope.realm.supportedLocales[i]) == -1) { + if (supportedLocales.indexOf($scope.realm.supportedLocales[i]) == -1) { $scope.realm.supportedLocales = supportedLocales; } } @@ -2311,4 +2310,4 @@ module.controller('RealmImportCtrl', function($scope, realm, $route, $route.reload(); } -}); \ No newline at end of file +});