config directive
This commit is contained in:
parent
df6d75e2c5
commit
f1ddaa8051
5 changed files with 31 additions and 51 deletions
|
@ -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.
|
* Used to select the element (invoke $(elem).select()) on specified action list.
|
||||||
* Usages kc-select-action="click mouseover"
|
* Usages kc-select-action="click mouseover"
|
||||||
|
|
|
@ -26,23 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<kc-tooltip>Name of the configuration.</kc-tooltip>
|
<kc-tooltip>Name of the configuration.</kc-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div data-ng-repeat="option in configType.properties" class="form-group">
|
<kc-provider-config config="config.config" properties="configType.properties"></kc-provider-config>
|
||||||
<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>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -45,23 +45,7 @@
|
||||||
</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">
|
<kc-provider-config config="mapper.config" properties="mapperType.properties"></kc-provider-config>
|
||||||
<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>
|
|
||||||
|
|
||||||
</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>
|
||||||
|
|
|
@ -69,23 +69,7 @@
|
||||||
</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">
|
<kc-provider-config config="mapper.config" properties="mapperType.properties"></kc-provider-config>
|
||||||
<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>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue