keycloak-aplcache
Changes
forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html 18(+1 -17)
forms/common-themes/src/main/resources/theme/base/admin/resources/partials/identity-provider-mapper-detail.html 18(+1 -17)
Details
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 eb34666..6a97f7c 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
@@ -1579,6 +1579,18 @@ module.directive('kcNavigationUser', function () {
}
});
+module.directive('kcProviderConfig', function () {
+ return {
+ scope: {
+ config: '=',
+ properties: '='
+ },
+ restrict: 'E',
+ replace: true,
+ templateUrl: resourceUrl + '/templates/kc-provider-config.html'
+ }
+});
+
/*
* Used to select the element (invoke $(elem).select()) on specified action list.
* Usages kc-select-action="click mouseover"
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html
index a093240..d6f3700 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html
@@ -26,23 +26,7 @@
</div>
<kc-tooltip>Name of the configuration.</kc-tooltip>
</div>
- <div data-ng-repeat="option in configType.properties" class="form-group">
- <label class="col-md-2 control-label">{{option.label}}</label>
-
- <div class="col-sm-4" data-ng-hide="option.type == 'boolean' || option.type == 'List'">
- <input class="form-control" type="text" data-ng-model="config.config[ option.name ]" >
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'boolean'">
- <input ng-model="config.config[ option.name ]" value="'true'" name="option.name" id="option.name" onoffswitchmodel />
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'List'">
- <select ng-model="config.config[ option.name ]" ng-options="data for data in option.defaultValue">
- <option value="" selected> Select one... </option>
- </select>
- </div>
- <kc-tooltip>{{option.helpText}}</kc-tooltip>
- </div>
-
+ <kc-provider-config config="config.config" properties="configType.properties"></kc-provider-config>
</fieldset>
<div class="form-group">
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/identity-provider-mapper-detail.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/identity-provider-mapper-detail.html
index 48bc1dd..80b8d45 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/identity-provider-mapper-detail.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/identity-provider-mapper-detail.html
@@ -45,23 +45,7 @@
</div>
<kc-tooltip>{{mapperType.helpText}}</kc-tooltip>
</div>
- <div data-ng-repeat="option in mapperType.properties" class="form-group">
- <label class="col-md-2 control-label">{{option.label}}</label>
-
- <div class="col-sm-4" data-ng-hide="option.type == 'boolean' || option.type == 'List'">
- <input class="form-control" type="text" data-ng-model="mapper.config[ option.name ]" >
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'boolean'">
- <input ng-model="mapper.config[ option.name ]" value="'true'" name="option.name" id="option.name" onoffswitchmodel />
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'List'">
- <select ng-model="mapper.config[ option.name ]" ng-options="data for data in option.defaultValue">
- <option value="" selected> Select one... </option>
- </select>
- </div>
- <kc-tooltip>{{option.helpText}}</kc-tooltip>
- </div>
-
+ <kc-provider-config config="mapper.config" properties="mapperType.properties"></kc-provider-config>
</fieldset>
<div class="pull-right form-actions" data-ng-show="create && access.manageRealm">
<button kc-cancel data-ng-click="cancel()">Cancel</button>
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/protocol-mapper-detail.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/protocol-mapper-detail.html
index 5f08b89..4697245 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/protocol-mapper-detail.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/protocol-mapper-detail.html
@@ -69,23 +69,7 @@
</div>
<kc-tooltip>{{mapperType.helpText}}</kc-tooltip>
</div>
- <div data-ng-repeat="option in mapperType.properties" class="form-group">
- <label class="col-md-2 control-label">{{option.label}}</label>
-
- <div class="col-sm-4" data-ng-hide="option.type == 'boolean' || option.type == 'List'">
- <input class="form-control" type="text" data-ng-model="mapper.config[ option.name ]" >
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'boolean'">
- <input ng-model="mapper.config[ option.name ]" value="'true'" name="option.name" id="option.name" onoffswitchmodel />
- </div>
- <div class="col-sm-4" data-ng-show="option.type == 'List'">
- <select ng-model="mapper.config[ option.name ]" ng-options="data for data in option.defaultValue">
- <option value="" selected> Select one... </option>
- </select>
- </div>
- <kc-tooltip>{{option.helpText}}</kc-tooltip>
- </div>
-
+ <kc-provider-config config="mapper.config" properties="mapperType.properties"></kc-provider-config>
</fieldset>
<div class="form-group">
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
new file mode 100755
index 0000000..31ac3be
--- /dev/null
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html
@@ -0,0 +1,16 @@
+<div data-ng-repeat="option in properties" class="form-group">
+ <label class="col-md-2 control-label">{{option.label}}</label>
+
+ <div class="col-sm-6" data-ng-hide="option.type == 'boolean' || option.type == 'List'">
+ <input class="form-control" type="text" data-ng-model="config[ option.name ]" >
+ </div>
+ <div class="col-sm-6" data-ng-show="option.type == 'boolean'">
+ <input ng-model="config[ option.name ]" value="'true'" name="option.name" id="option.name" onoffswitchmodel />
+ </div>
+ <div class="col-sm-6" data-ng-show="option.type == 'List'">
+ <select ng-model="config[ option.name ]" ng-options="data for data in option.defaultValue">
+ <option value="" selected> Select one... </option>
+ </select>
+ </div>
+ <kc-tooltip>{{option.helpText}}</kc-tooltip>
+</div>