From 79ea9ed31470058b2c9e604647ad8577cbbc9560 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 4 Sep 2015 14:17:30 +0200 Subject: [PATCH] KEYCLOAK-1803 On/off switches in mappers doesn't work --- .../src/main/resources/theme/base/admin/resources/js/app.js | 6 +++--- .../base/admin/resources/templates/kc-provider-config.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js index 9b7ba1c79b..7819f8b2cf 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -1465,7 +1465,7 @@ module.directive('onoffswitch', function() { }); /** - * Directive for presenting an ON-OFF switch for checkbox. + * Directive for presenting an ON-OFF switch for checkbox. The directive expects the value to be string 'true' or 'false', not boolean true/false * This directive provides some additional capabilities to the default onoffswitch such as: * * - Dynamic values for id and name attributes. Useful if you need to use this directive inside a ng-repeat @@ -1473,7 +1473,7 @@ module.directive('onoffswitch', function() { * * Usage: */ -module.directive('onoffswitchmodel', function() { +module.directive('onoffswitchstring', function() { return { restrict: "EA", replace: true, @@ -1488,7 +1488,7 @@ module.directive('onoffswitchmodel', function() { }, // TODO - The same code acts differently when put into the templateURL. Find why and move the code there. //templateUrl: "templates/kc-switch.html", - template: "
", + template: '
', compile: function(element, attrs) { if (!attrs.onText) { attrs.onText = "ON"; } diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html index 4fee2af1c8..08b76a82b1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html @@ -6,7 +6,7 @@
- +