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

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

    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th colspan="6" class="kc-table-actions">
                <div class="dropdown pull-left">
                    <select class="form-control" ng-model="flow"
                            ng-options="(flow.alias|capitalize) for flow in flows"
                            data-ng-change="setupForm()">
                    </select>
                </div>
            </th>
        </tr>
        <tr data-ng-hide="executions.length == 0">
            <th colspan="2">Auth Type</th>
            <th colspan="{{flowmax}}">Requirement</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="execution in executions" data-ng-show="executions.length > 0">
            <td ng-show="execution.subFlow"></td>
            <td>{{execution.referenceType|capitalize}}</td>
            <td ng-hide="execution.subFlow"></td>
            <td ng-repeat="choice in execution.requirementChoices">
                <!--
                <div class="dropdown pull-left">
                <select class="form-control"
                        ng-model="execution.requirement"
                        ng-options="choice for choice in execution.requirementChoices">
                </select>
                </div>
                -->
                <!--
                <div ng-repeat="choice in execution.requirementChoices">
                <label >
                    <input type="radio" ng-model="execution.requirement" ng-value="choice">
                    {{choice}}
                </label>
                </div>
                -->
            <label >
                <input type="radio" ng-model="execution.requirement" ng-value="choice" ng-change="updateExecution(execution)">
                {{choice}}
            </label>

            </td>
            <td ng-repeat="emptee in execution.empties"></td>
            <td>
                <a data-ng-show="execution.configurable && execution.authenticationConfig == null" class="btn btn-default" href="#/create/authentication/{{realm.realm}}/execution/{{execution.id}}/provider/{{execution.providerId}}">Configure</a>
                <a data-ng-show="execution.configurable && execution.authenticationConfig != null" class="btn btn-default" href="#/realms/{{realm.realm}}/authentication/config/{{execution.providerId}}/{{execution.authenticationConfig}}">Configure</a>
            </td>
         </tr>
        <tr data-ng-show="executions.length == 0">
            <td>No executions available</td>
        </tr>
        </tbody>
    </table>
</div>

<kc-menu></kc-menu>