<div class="bs-sidebar col-sm-3 " data-ng-include data-src="'partials/realm-menu.html'"></div>
<div id="content-area" class="col-sm-9" role="main">
    <div id="content">
        <h2>Add Realm</h2>
        <p class="subtitle"><span class="required">*</span> Required fields</p>

        <form class="form-horizontal" name="realmForm" novalidate>
            <fieldset>
                <legend uncollapsed><span class="text">Import Realm</span></legend>
                <div class="form-group">
                    <label for="name" class="col-sm-2 control-label">Upload JSON File </label>
                    <div class="col-sm-4">
                        <div class="controls kc-button-input-file" data-ng-show="!files || files.length == 0">
                            <a href="#" class="kc-button"><span class="kc-icon-upload">Icon: Upload</span>Choose a JSON File...</a>
                            <input id="import-file" type="file" class="transparent" ng-file-select="onFileSelect($files)">
                        </div>
                        <span class="kc-uploaded-file" data-ng-show="files.length > 0">{{files[0].name}}</span>
                        <button class="kc-link" data-ng-show="files.length > 0" data-ng-click="changeFileSelect();">Change</button>
                    </div>
                </div>
                <div class="form-actions inside">
                    <button type="submit" data-ng-click="uploadFile()" class="primary" data-ng-show="files.length > 0">Upload</button>
                </div>
            </fieldset>
        </form>

        <form class="form-horizontal" name="realmForm" novalidate>
            <fieldset>
                <legend uncollapsed><span class="text">Create Realm</span></legend>
                <div class="form-group">
                    <label for="name" class="col-sm-2 control-label">Name <span class="required">*</span></label>

                    <div class="col-sm-4">
                        <input type="text" id="name" name="name" data-ng-model="realm.realm" autofocusrequired>
                    </div>
                </div>
                <div class="form-group">
                    <label for="enabled" class="col-sm-2 control-label">Enabled</label>
                    <div class="col-sm-4">
                        <input ng-model="realm.enabled" name="enabled" id="enabled" onoffswitch />
                    </div>
                </div>
            </fieldset>

            <div class="pull-right form-actions">
                <button kc-cancel data-ng-click="cancel()">Cancel</button>
                <button kc-save data-ng-show="changed">Save</button>
            </div>

        </form>
    </div>
</div>
