From 55ab973cad959c6524a4998085fcd7951278e694 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 18 Jan 2016 20:28:34 +0100 Subject: [PATCH] KEYCLOAK-2308 Save button is enabled on Theme page --- .../theme/base/admin/resources/js/controllers/realm.js | 4 ++-- .../base/admin/resources/partials/realm-theme-settings.html | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js index a3c99e8de7..548c6e1ded 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js @@ -343,8 +343,8 @@ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serv }; $scope.$watch('realm.supportedLocales', function(oldVal, newVal) { - if(angular.isUndefined(newVal) || (angular.isArray(newVal) && newVal.length == 0)){ - $scope.realm.defaultLocale = undefined; + if ($scope.realm.defaultLocale && newVal && newVal.indexOf($scope.realm.defaultLocale) == -1) { + $scope.realm.defaultLocale = null; } }, true); }); diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-theme-settings.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-theme-settings.html index 4d77b89d87..0c36f93c64 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-theme-settings.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-theme-settings.html @@ -65,7 +65,9 @@
- +