<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="resourceUrl + '/partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main">
    <kc-navigation-application></kc-navigation-application>
    <div id="content">
        <ol class="breadcrumb" data-ng-hide="create">
            <li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
            <li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
            <li class="active">Identity Provider</li>
        </ol>
        <h2 data-ng-hide="create"><span>{{application.name}}</span> Identity Provider Settings</h2>
        <form class="form-horizontal" name="identityProviderForm" novalidate>
            <div class="form-group" ng-repeat="identityProvider in identityProviders">
                <legend><span class="text">{{identityProvider.identityProvider.name}}</span></legend>
                <label class="col-sm-2 control-label" for="{{identityProvider.identityProvider.id}}">Enable&nbsp;<span tooltip-placement="right" tooltip="If disabled, users can not login to the application using this identity provider." class="fa fa-info-circle"></span></label>
                <div class="col-sm-4">
                    <input ng-model="application.identityProviders[$index].id" name="identityProvider.identityProvider.id" id="identityProvider.identityProvider.id" value="identityProvider.identityProvider.id" onoffswitchmodel />
                </div>
                <div data-ng-show="application.identityProviders[$index].id">
                    <label class="col-sm-2 control-label" for="{{identityProvider.identityProvider.id}}retrieveToken">Can Retrieve Token&nbsp;<span tooltip-placement="right" tooltip="If disabled, the application can not retrieve tokens from the identity provider." class="fa fa-info-circle"></span></label>
                    <div class="col-sm-4">
                        <input ng-model="application.identityProviders[$index].retrieveToken" name="identityProvider.identityProvider.id + 'retrieveToken'" id="identityProvider.identityProvider.id + 'retrieveToken'" value="true" onoffswitchmodel />
                    </div>
                </div>
            </div>
            <div class="pull-right form-actions">
                <button kc-reset data-ng-show="changed">Clear changes</button>
                <button kc-save data-ng-show="changed">Save</button>
            </div>
        </form>
    </div>
</div>
