<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">

    <ol class="breadcrumb">
        <li><a href="#/realms/{{realm.realm}}/authentication/flows">Authentication Flows</a></li>
        <li class="active" data-ng-show="create">Create Authenticator Config</li>
        <li class="active" data-ng-hide="create">{{config.alias}}</li>
    </ol>

    <h1 data-ng-show="create">Create Authenticator Config</h1>
    <h1 data-ng-hide="create">{{config.alias|capitalize}}<a><i style="padding-left: 20px" class="pficon pficon-delete" data-ng-show="!create && access.manageRealm"
    	data-ng-hide="changed" data-ng-click="remove()"></i></a></h1>

    <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">

        <fieldset>
            <div class="form-group clearfix" data-ng-show="!create">
                <label class="col-md-2 control-label" for="configId">ID </label>
                <div class="col-md-6">
                    <input class="form-control" id="configId" type="text" ng-model="config.id" readonly>
                </div>
            </div>
            <div class="form-group clearfix">
                <label class="col-md-2 control-label" for="name">Alias</label>
                <div class="col-md-6">
                    <input class="form-control" id="name" type="text" ng-model="config.alias" data-ng-readonly="!create">
                </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>

        </fieldset>

        <div class="form-group">
            <div class="col-md-10 col-md-offset-2" data-ng-show="create && access.manageRealm">
                <button kc-save>Save</button>
                <button kc-cancel data-ng-click="cancel()">Cancel</button>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-10 col-md-offset-2" data-ng-show="!create && access.manageRealm">
                <button kc-save  data-ng-show="changed">Save</button>
                <button kc-reset data-ng-show="changed">Cancel</button>
            </div>
        </div>
    </form>
</div>

<kc-menu></kc-menu>