<div>
    <div data-ng-repeat="option in properties" class="form-group" data-ng-controller="ProviderConfigCtrl">
        <label class="col-md-2 control-label">{{:: option.label | translate}}</label>

        <div class="col-md-6" data-ng-hide="option.type == 'boolean' || option.type == 'List' || option.type == 'Role' || option.type == 'ClientList' || option.type == 'Password' || option.type=='Script'">
            <input class="form-control" type="text" data-ng-model="config[ option.name ]" >
        </div>
        <div class="col-md-6" data-ng-show="option.type == 'Password'">
            <input class="form-control" type="password" data-ng-model="config[ option.name ]" >
        </div>
        <div class="col-md-6" data-ng-show="option.type == 'boolean'">
            <input ng-model="config[ option.name ]" value="'true'" name="option.name" id="option.name" onoffswitchstring on-text="{{:: 'onText' | translate}}" off-text="{{:: 'offText' | translate}}"/>
        </div>
        <div class="col-md-6" data-ng-show="option.type == 'List'">
            <select ng-model="config[ option.name ]" ng-options="data for data in option.options">
                <option value="" selected> {{:: 'selectOne' | translate}} </option>
            </select>
        </div>
        <div class="col-md-6" data-ng-show="option.type == 'Role'">
            <div class="row">
                <div class="col-md-8">
                    <input class="form-control" type="text" data-ng-model="config[ option.name ]" >
                </div>
                <div class="col-md-2">
                    <button type="button" data-ng-click="openRoleSelector(option.name, config)" class="btn btn-default" tooltip-placement="top" tooltip-trigger="mouseover mouseout" tooltip="{{:: 'selectRole.tooltip' | translate}}">{{:: 'selectRole.label' | translate}}</button>
                </div>
            </div>
        </div>
        <div class="col-md-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> {{:: 'selectOne' | translate}} </option>
            </select>
        </div>

        <div class="col-md-6" data-ng-show="option.type == 'Script'">
            <div ng-model="config[option.name]" placeholder="Enter your script..." ui-ace="{ onLoad : initEditor, useWrapMode: true, showGutter: true, theme:'github', mode: 'javascript'}">
                {{config[option.name]}}
            </div>
        </div>

        <kc-tooltip>{{:: option.helpText | translate}}</kc-tooltip>
    </div>
</div>