<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2">
    <h1>{{:: 'authentication' | translate}}</h1>

    <kc-tabs-authentication></kc-tabs-authentication>

    <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
        <table class="table table-striped table-bordered">
            <caption class="hidden">{{:: 'table-of-password-policies' | translate}}</caption>
            <thead>
            <tr ng-show="(serverInfo.passwordPolicies|removeSelectedPolicies:policy).length > 0">
                <th colspan="5" class="kc-table-actions">
                    <div class="pull-right">
                        <div>
                            <select class="form-control" ng-model="selectedPolicy"
                                    ng-options="policy as policy.displayName for policy in (serverInfo.passwordPolicies|removeSelectedPolicies:policy) track by policy.id"
                                    data-ng-change="addPolicy(selectedPolicy); selectedPolicy = null">
                                <option value="" disabled selected>{{:: 'add-policy.placeholder' | translate}}</option>
                            </select>
                        </div>
                    </div>
                </th>
            </tr>
            <tr>
                <th>{{:: 'policy-type' | translate}}</th>
                <th>{{:: 'policy-value' | translate}}</th>
                <th>{{:: 'actions' | translate}}</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="p in policy">
                <td>{{p.displayName}}</td>
                <td>
                    <input type="text" class="form-control" ng-model="p.value" ng-show="p.configType" data-ng-required="p.configType && !p.defaultValue">
                </td>
                <td class="kc-action-cell" ng-click="removePolicy($index)">{{:: 'delete' | translate}}</td>
            </tr>
            </tbody>
        </table>

        <div class="form-group" data-ng-show="access.manageRealm">
            <div class="col-md-12">
                <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
                <button kc-reset data-ng-disabled="!changed">{{:: 'cancel' | translate}}</button>
            </div>
        </div>
    </form>

</div>


<kc-menu></kc-menu>
