Merge pull request #1444 from mposolda/master
Use kc-provider-config in LDAP mappers
This commit is contained in:
commit
11e2f19503
3 changed files with 9 additions and 23 deletions
|
@ -1649,7 +1649,8 @@ module.directive('kcProviderConfig', function ($modal) {
|
||||||
scope: {
|
scope: {
|
||||||
config: '=',
|
config: '=',
|
||||||
properties: '=',
|
properties: '=',
|
||||||
realm: '='
|
realm: '=',
|
||||||
|
clients: '='
|
||||||
},
|
},
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
replace: true,
|
replace: true,
|
||||||
|
|
|
@ -45,28 +45,8 @@
|
||||||
</div>
|
</div>
|
||||||
<kc-tooltip>{{mapperType.helpText}}</kc-tooltip>
|
<kc-tooltip>{{mapperType.helpText}}</kc-tooltip>
|
||||||
</div>
|
</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-show="option.type == 'String'">
|
|
||||||
<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>
|
|
||||||
<div class="col-sm-4" data-ng-show="option.type == 'ClientList'">
|
|
||||||
<select ng-model="mapper.config[ option.name ]" ng-options="client.clientId as client.clientId for client in clients">
|
|
||||||
<option value="" selected> Select one... </option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<kc-tooltip>{{option.helpText}}</kc-tooltip>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<kc-provider-config config="mapper.config" properties="mapperType.properties" realm="realm" clients="clients"></kc-provider-config>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="pull-right form-actions" data-ng-show="create && access.manageRealm">
|
<div class="pull-right form-actions" data-ng-show="create && access.manageRealm">
|
||||||
<button kc-cancel data-ng-click="cancel()">Cancel</button>
|
<button kc-cancel data-ng-click="cancel()">Cancel</button>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div data-ng-repeat="option in properties" class="form-group">
|
<div data-ng-repeat="option in properties" class="form-group">
|
||||||
<label class="col-md-2 control-label">{{option.label}}</label>
|
<label class="col-md-2 control-label">{{option.label}}</label>
|
||||||
|
|
||||||
<div class="col-sm-6" data-ng-hide="option.type == 'boolean' || option.type == 'List' || option.type == 'Role'">
|
<div class="col-sm-6" data-ng-hide="option.type == 'boolean' || option.type == 'List' || option.type == 'Role' || option.type == 'ClientList'">
|
||||||
<input class="form-control" type="text" data-ng-model="config[ option.name ]" >
|
<input class="form-control" type="text" data-ng-model="config[ option.name ]" >
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6" data-ng-show="option.type == 'boolean'">
|
<div class="col-sm-6" data-ng-show="option.type == 'boolean'">
|
||||||
|
@ -18,6 +18,11 @@
|
||||||
<div class="col-sm-4" data-ng-show="option.type == 'Role'">
|
<div class="col-sm-4" data-ng-show="option.type == 'Role'">
|
||||||
<button type="submit" data-ng-click="openRoleSelector(option.name)" class="btn btn-default" tooltip="Enter role in the textbox to the left, or click this button to browse and select the role you want">Select Role</button>
|
<button type="submit" data-ng-click="openRoleSelector(option.name)" class="btn btn-default" tooltip="Enter role in the textbox to the left, or click this button to browse and select the role you want">Select Role</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-4" data-ng-show="option.type == 'ClientList'">
|
||||||
|
<select ng-model="config[ option.name ]" ng-options="client.clientId as client.clientId for client in clients">
|
||||||
|
<option value="" selected> Select one... </option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<kc-tooltip>{{option.helpText}}</kc-tooltip>
|
<kc-tooltip>{{option.helpText}}</kc-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue