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 f38c9af..ba0917b 100644
--- 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
@@ -1157,19 +1157,27 @@ module.controller('GenericKeystoreCtrl', function($scope, $location, Notificatio
'priority': ["0"]
}
}
+ } else {
+ $scope.instance = angular.copy(instance);
+ }
- if (providerFactory.properties) {
- for (var i = 0; i < providerFactory.properties.length; i++) {
- var configProperty = providerFactory.properties[i];
+ if (providerFactory.properties) {
+ for (var i = 0; i < providerFactory.properties.length; i++) {
+ var configProperty = providerFactory.properties[i];
+ if (!$scope.instance.config[configProperty.name]) {
if (configProperty.defaultValue) {
$scope.instance.config[configProperty.name] = [configProperty.defaultValue];
+ if (!$scope.create) {
+ instance.config[configProperty.name] = [configProperty.defaultValue];
+ }
} else {
$scope.instance.config[configProperty.name] = [''];
+ if (!$scope.create) {
+ instance.config[configProperty.name] = [configProperty.defaultValue];
+ }
}
}
}
- } else {
- $scope.instance = angular.copy(instance);
}
$scope.$watch('instance', function() {