<div ng-controller="CreateRoleController">
    <div>
        <ul class="breadcrumb">
            <li><a href="#/system">{{'label.anchor.system' | translate}}</a></li>
            <li><a href="#/admin/roles">{{'label.anchor.viewroles' | translate}}</a></li>
            <li class="active">{{'label.anchor.addrole' | translate}}</li>
        </ul>
    </div>
    <form name="addroleform" novalidate="" class="form-horizontal well" rc-submit="submit()">
        <api-validate></api-validate>
        <fieldset>
            <legend>{{'label.heading.addrole' | translate}}</legend>

            <div class="form-group">
                <label class="control-label col-sm-2" for="name">{{'label.input.name' | translate}}<span
                        class="required">*</span></label>

                <div class="col-sm-3">
                    <input id="name" type="text" name="name" ng-model="formData.name" class="form-control" required late-Validate/>
                </div>
                <div class="col-sm-3">
                    <form-validate valattributeform="addroleform" valattribute="name"/>
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-sm-2" name="" for="description">{{'label.input.description' | translate}}<span
                        class="required">*</span></label>

                <div class="col-sm-3">
                    <textarea id="description" type="text" rows="2" name="description" ng-model="formData.description"
                              class="form-control" required late-Validate></textarea>
                </div>
                <div class="col-sm-3">
                    <form-validate valattributeform="addroleform" valattribute="description"/>
                </div>
            </div>

            <div class="col-md-offset-3">
                <a id="cancel" href="#/admin/roles" class="btn btn-default">{{'label.button.cancel' | translate}}</a>
                <button id="save" type="submit" class="btn btn-primary" has-permission='CREATE_ROLE'>{{'label.button.save' | translate}}</button>
            </div>
        </fieldset>
    </form>
</div>
