<div class="bs-sidebar col-sm-3 " data-ng-include data-src="resourceUrl + '/partials/realm-menu.html'"></div>
<div id="content-area" class="col-sm-9" role="main">
    <kc-navigation data-kc-current="general" data-kc-realm="realm.realm" data-kc-social="social"></kc-navigation>
    <h2></h2>
    <div id="content">
        <div data-ng-show="access.viewRealm">
            <h2 class="pull-left" data-ng-show="createRealm">Add Realm</h2>
            <h2 data-ng-hide="createRealm"><span>{{realm.realm}}</span> General Settings</h2>
            <p class="subtitle" data-ng-show="createRealm"><span class="required">*</span> Required fields</p>
            <form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageRealm">
                <fieldset class="border-top">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="name">Name <span class="required" data-ng-show="createRealm">*</span></label>
                        <div class="col-sm-4">
                            <input class="form-control" type="text" id="name" name="name" data-ng-model="realm.realm" autofocus required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="enabled">Enabled</label>
                        <span tooltip="Users and applications can only access a realm if it's enabled" class="fa fa-info-circle"></span>
                        <div class="col-sm-4">
                            <input ng-model="realm.enabled" name="enabled" id="enabled" onoffswitch />
                        </div>
                    </div>
                </fieldset>

                <div class="pull-right form-actions" data-ng-show="createRealm && access.manageRealm">
                    <button kc-cancel data-ng-click="cancel()">Cancel</button>
                    <button kc-save data-ng-show="changed">Save</button>
                </div>
                <div class="pull-right form-actions" data-ng-show="!createRealm && access.manageRealm">
                    <button kc-reset data-ng-show="changed">Clear changes</button>
                    <button kc-save  data-ng-show="changed">Save</button>
                    <button kc-delete data-ng-click="remove()" data-ng-hide="changed">Delete Realm</button>
                </div>
            </form>
        </div>
        <div data-ng-hide="access.viewRealm">
            <h2 ><span>{{realm.realm}}</span></h2>
        </div>

    </div>
</div>