<div id="wrapper" class="container">
    <div class="row">
        <div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
        <div id="content-area" class="col-md-9" role="main">
            <div id="content">
                <h2 class="pull-left">Add Realm</h2>
                <p class="subtitle"><span class="required">*</span> Required fields</p>
                <form name="uploadForm" novalidate>
                    <fieldset>
                        <legend uncollapsed><span class="text">Import Realm</span></legend>
                        <div class="form-group clearfix">
                            <label for="name">Upload JSON File </label>
                            <div class="controls button-input-file" data-ng-show="!files || files.length == 0">
                                <a href="#" class="button"><span class="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="uploaded-file" data-ng-show="files.length > 0">{{files[0].name}}</span>
                            <button class="link" data-ng-show="files.length > 0" data-ng-click="changeFileSelect();">Change</button>
                        </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 name="realmForm" novalidate>
                    <fieldset>
                        <legend uncollapsed><span class="text">Create Realm</span></legend>
                        <div class="form-group">
                            <label for="name">Name <span class="required">*</span></label>

                            <div class="controls">
                                <input type="text" id="name" name="name" data-ng-model="realm.realm" autofocus
                                       required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="enabled" class="control-label">Enabled</label>
                            <input ng-model="realm.enabled" name="enabled" id="enabled" onoffswitch />
                        </div>
                    </fieldset>

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

                </form>
            </div>
        </div>
        <div id="container-right-bg"></div>
    </div>
</div>