<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}}/clients">Clients</a></li>
        <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></li>
        <li><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/saml/keys">SAML Keys</a></li>
        <li class="active">SAML {{keyType}} Key Import</li>
    </ol>

    <h1><strong>Import SAML Key</strong> {{client.clientId|capitalize}}</h1>

    <form class="form-horizontal" name="keyForm" novalidate kc-read-only="!access.manageRealm">
        <fieldset>
            <div class="form-group">
                <label class="col-md-2 control-label" for="uploadKeyFormat">Archive Format</label>
                <div class="col-sm-6">
                    <div>
                        <select class="form-control" id="uploadKeyFormat"
                                ng-model="uploadKeyFormat"
                                ng-options="f for f in keyFormats">
                        </select>
                    </div>
                </div>
                <kc-tooltip>Java keystore or PKCS12 archive format.</kc-tooltip>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="uploadKeyAlias">Key Alias</label>
                <div class="col-md-6">
                    <input class="form-control" type="text" id="uploadKeyAlias" name="uploadKeyAlias" data-ng-model="uploadKeyAlias" autofocus required>
                </div>
                <kc-tooltip>Archive alias for your certificate.</kc-tooltip>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="uploadStorePassword">Store Password</label>
                <div class="col-md-6">
                    <input class="form-control" type="password" id="uploadStorePassword" name="uploadStorePassword" data-ng-model="uploadStorePassword" autofocus required>
                </div>
                <kc-tooltip>Password to access the archive itself</kc-tooltip>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">Import File </label>
                <div class="col-md-6">
                    <div class="controls kc-button-input-file" data-ng-show="!files || files.length == 0">
                        <label for="import-file" class="btn btn-default">Select file <i class="pficon pficon-import"></i></label>
                        <input id="import-file" type="file" class="hidden" ng-file-select="onFileSelect($files)">
                    </div>
                    <span class="kc-uploaded-file" data-ng-show="files.length > 0">
                        {{files[0].name}}
                    </span>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-10 col-md-offset-2" data-ng-show="files.length > 0">
                    <button type="submit" data-ng-click="uploadFile()" class="btn btn-primary">Import</button>
                    <button type="submit" data-ng-click="clearFileSelect()" class="btn btn-default">Cancel</button>
                </div>
            </div>
        </fieldset>
    </form>
</div>

<kc-menu></kc-menu>