<div id="wrapper" class="container">
    <div class="row">
        <aside class="span3" data-ng-include data-src="'partials/realm-menu.html'"></aside>
        <div id="actions-bg"></div>

        <div id="container-right" class="span9">
            <h1 data-ng-show="create"><span class="gray">New Role</span></h1>

            <h1 data-ng-hide="create">
                <span class="gray">Realm Role {{role.name}}</span>
            </h1>

            <div data-ng-show="roleForm.showErrors && roleForm.$error.required" class="alert alert-error">Please fill in
                all required fields
            </div>
            <p class="subtitle subtitle-right"><span class="required">*</span> Required fields</p>

            <form class="form-horizontal" name="roleForm" novalidate>
                <fieldset>
                    <legend>Details</legend>
                    <div class="control-group">
                        <label class="control-label" for="name">Role name <span class="required">*</span></label>

                        <div class="controls">
                            <input type="text" class="input-xlarge" id="name" name="name" data-ng-model="role.name"
                                   autofocus required data-ng-readonly="!create">
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label" for="description">Description </label>

                        <div class="controls">
                            <input type="text" class="input-xlarge" id="description" name="description" data-ng-model="role.description">
                        </div>
                    </div>
                </fieldset>
                <div class="form-actions" data-ng-show="create">
                    <button type="submit" data-ng-click="save()" class="btn btn-primary" data-ng-show="changed">Save
                    </button>
                    <button type="submit" data-ng-click="cancel()" class="btn" 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="btn btn-primary" data-ng-show="changed">Save
                        changes
                    </button>
                    <button type="submit" data-ng-click="reset()" class="btn" data-ng-show="changed">Clear changes
                    </button>
                    <button type="submit" data-ng-click="remove()" class="btn btn-danger" data-ng-hide="changed">
                        Delete
                    </button>
                </div>

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