<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 class="top-nav">
                <ul class="rcue-tabs">
                    <li class="active"><a href="#">Settings</a></li>
                    <li><a href="#">Credentials</a></li>
                    <li><a href="#">Installation</a></li>
                    <li><a href="#">Roles</a></li>
                    <li><a href="#">Scopes</a></li>
                    <li><a href="#">Sessions</a></li>
                </ul>
            </div>
            <div id="content">
                <h2 class="pull-left" data-ng-show="create">New Application</h2>
                <h2 class="pull-left" data-ng-hide="create">Application <span>{{application.name}}</span></h2>
                <p class="subtitle"><span class="required">*</span> Required fields</p>
                <form name="applicationForm" novalidate>
                    <fieldset>
                        <legend uncollapsed><span class="text">Application Settings</span></legend>
                        <div class="form-group">
                            <label for="name">Name</label><span class="required">*</span>
                            <div class="controls">
                            <input type="text" id="name" name="name" data-ng-model="application.name" autofocus
                                   required>
                            </div>
                        </div>

                        <div class="form-group clearfix block">
                            <label class="control-label">Enabled</label>
                            <div class="onoffswitch">
                                <input type="checkbox" data-ng-model="application.enabled" class="onoffswitch-checkbox"
                                       name="enabled" id="enabled">
                                <label for="enabled" class="onoffswitch-label">
                                            <span class="onoffswitch-inner">
                                                <span class="onoffswitch-active">ON</span>
                                                <span class="onoffswitch-inactive">OFF</span>
                                            </span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="adminUrl" class="control-label">Admin URL</label>

                            <div class="controls">
                                <input class="input-small" type="text" name="adminUrl" id="adminUrl"
                                       data-ng-model="application.adminUrl">
                            </div>
                        </div>
                    </fieldset>
                    <div class="form-actions" data-ng-show="create">
                        <button type="submit" data-ng-click="save()" class="primary">Save
                        </button>
                        <button type="submit" data-ng-click="cancel()" data-ng-click="cancel()"
                                data-ng-show="changed">Cancel
                        </button>
                    </div>

                    <div class="form-actions" data-ng-show="!create">
                        <button type="submit" data-ng-click="save()" class="primary" data-ng-show="changed">Save
                            changes
                        </button>
                        <button type="submit" data-ng-click="reset()" data-ng-show="changed">Clear changes
                        </button>
                        <button type="submit" data-ng-click="remove()" class="danger">
                            Delete
                        </button>
                    </div>

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