<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-oauth-client></kc-navigation-oauth-client>
    <div id="content">
        <ol class="breadcrumb" data-ng-hide="create">
            <li><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
            <li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
            <li class="active">Identity Provider</li>
        </ol>
        <h2 data-ng-hide="create"><span>{{oauth.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="oauth.identityProviders[$index].id" name="identityProvider.identityProvider.id" id="identityProvider.identityProvider.id" value="identityProvider.identityProvider.id" onoffswitchmodel />
                </div>
                <div data-ng-show="oauth.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="oauth.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>
