<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">
                            <label for="name">Choose JSON File: </label>
                            <div class="controls">
                                <input type="file" ng-file-select="onFileSelect($files)" >
                            </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>
                        
                        
                        <!-- THIS APPEARS INITIALLY
                        
<div class="form-group clearfix">
                            <label for="upload">Upload JSON File</label>
                            <div class="controls button-input-file">
                                <a class="button" href="#"><span class="icon-upload">Icon: Upload</span>Choose a JSON File...</a>
                                <input type="file" ng-file-select="onFileSelect($files)" class="transparent" id="upload">
                            </div>
                        </div>
-->
                        <!-- THE DIV ABOVE IS REPLACED BY THIS AFTER CHOOSING A FILE
                        
<div class="form-group clearfix">
                            <label for="upload">Upload JSON File </label>
                            <span class="uploaded-file">a-new-realm-uploaded.json</span>
                            <div class="link-input-file">
                                <button class="link">Change</button>
                                <input type="file" ng-file-select="onFileSelect($files)" class="transparent" id="upload">
                            </div>
                        </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>