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 77dc9cdb4e..0b48d4c7a2 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 @@ -524,13 +524,11 @@ module.controller('RealmPasswordPolicyCtrl', function($scope, Realm, realm, $htt } var policyString = ""; for (var i = 0; i < policies.length; i++) { - policyString += policies[i].id; - if (policies[i].value && policies[i].value != policies[i].defaultValue) { - policyString += '(' + policies[i].value + ')'; + policyString += policies[i].id + '(' + policies[i].value + ')'; + if (i != policies.length - 1) { + policyString += ' and '; } - policyString += " and "; } - policyString = policyString.substring(0, policyString.length - 5); return policyString; } @@ -560,7 +558,7 @@ module.controller('RealmPasswordPolicyCtrl', function($scope, Realm, realm, $htt $scope.save = function() { $scope.realm.passwordPolicy = toString($scope.policy); - console.debug($scope.realm.passwordPolicy); + console.log($scope.realm.passwordPolicy); Realm.update($scope.realm, function () { $route.reload();