<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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-initial-access">{{:: 'initial-access-tokens' | translate}}</a></li>
        <li>{{hostName}}</li>
    </ol>

    <h1>{{hostName}}</h1>

    <form class="form-horizontal" name="createForm" novalidate kc-read-only="!access.manageRealm">

        <div class="form-group">
            <label class="col-md-2 control-label" for="hostName">{{:: 'hostname' | translate}} </label>
            <div class="col-sm-6">
                <input class="form-control" type="text" id="hostName" name="hostName" data-ng-model="hostName" readonly>
            </div>
            <kc-tooltip>{{:: 'client-reg-hostname.tooltip' | translate}}</kc-tooltip>
        </div>

        <div class="form-group">
            <label class="col-md-2 control-label" for="count">{{:: 'count' | translate}} </label>
            <div class="col-sm-6">
                <input class="form-control" type="text" id="count" name="count" required min="1" max="10000" data-ng-model="count">
            </div>
            <kc-tooltip>{{:: 'client-reg-count.tooltip' | translate}}</kc-tooltip>
        </div>

        <div class="form-group">
            <label class="col-md-2 control-label" for="remainingCount">{{:: 'remainingCount' | translate}} </label>
            <div class="col-sm-6">
                <input class="form-control" type="text" id="remainingCount" name="remainingCount" data-ng-model="remainingCount" readonly>
            </div>
            <kc-tooltip>{{:: 'client-reg-remainingCount.tooltip' | translate}}</kc-tooltip>
        </div>

        <div class="form-group">
            <div class="col-md-10 col-md-offset-2" data-ng-show="access.manageRealm">
                <button class="btn btn-primary" data-ng-click="resetRemainingCount()" data-ng-hide="changed">{{:: 'reset-remaining-count' | translate}}</button>
                <button data-ng-show="changed" kc-save>{{:: 'save' | translate}}</button>
                <button kc-cancel data-ng-click="cancel()">{{:: 'cancel' | translate}}</button>
            </div>
        </div>
    </form>

</div>

<kc-menu></kc-menu>