<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}}/client-templates">{{:: 'client-templates' | translate}}</a></li>
        <li data-ng-show="create">{{:: 'add-client-template' | translate}}</li>
        <li data-ng-hide="create">{{template.name}}</li>
    </ol>

    <kc-tabs-client-template></kc-tabs-client-template>

    <form class="form-horizontal" name="clientForm" novalidate kc-read-only="!access.manageClients">
        <fieldset class="border-top">
            <div class="form-group">
                <label class="col-md-2 control-label" for="name">{{:: 'name' | translate}} </label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" id="name" name="name" data-ng-model="template.name" autofocus>
                </div>
                <kc-tooltip>{{:: 'client-template.name.tooltip' | translate}}</kc-tooltip>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="description">{{:: 'description' | translate}} </label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" id="description" name="description" data-ng-model="template.description">
                </div>
                <kc-tooltip>{{:: 'client-template.description.tooltip' | translate}}</kc-tooltip>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="protocol">{{:: 'protocol' | translate}}</label>
                <div class="col-sm-6">
                    <div>
                        <select class="form-control" id="protocol"
                                ng-change="changeProtocol()"
                                ng-model="protocol"
                                ng-options="aProtocol for aProtocol in protocols">
                        </select>
                    </div>
                </div>
                <kc-tooltip>{{:: 'client-template.protocol.tooltip' | translate}}</kc-tooltip>
            </div>
         </fieldset>

        <div class="form-group">
            <div class="col-md-10 col-md-offset-2" data-ng-show="create && access.manageClients">
                <button kc-save data-ng-disabled="!changed">{{:: 'save' | translate}}</button>
                <button kc-cancel data-ng-click="cancel()">{{:: 'cancel' | translate}}</button>
            </div>
            <div class="col-md-10 col-md-offset-2" data-ng-show="!create && access.manageClients">
                <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>