<form name="roleForm" ng-submit="newAction()">
    <div class="form-group"
         data-ng-class="{'has-error': roleForm.name.$dirty && roleForm.name.$invalid}">
        <label class="col-md-2 col-form-label">{{'ROLE_NAME' | translate}}</label>
        <div class="col-md-4">
            <input class="form-control" type="text" data-ng-model="entity.name" name="name" required
                   pi-unique="{{uniqueUrl}}">
        </div>
        <div class="col-md-4 form-text">
      <span class="help-inline" data-ng-show="roleForm.name.$valid">
        <i class="icon-ok text-success"></i>
      </span>
            <span class="help-inline"
                  data-ng-show="roleForm.name.$error.required">
        {{'REQUIRED' | translate}}
      </span>
            <span class="help-inline"
                  data-ng-show="roleForm.name.$error.unique">
        {{'ROLE_NAME_TOKEN' | translate}}
      </span>
        </div>
    </div>
    <div class="form-group"
         data-ng-class="{'has-error': roleForm.title.$dirty && roleForm.title.$invalid}">
        <label class="col-md-2 col-form-label">{{'ROLE_TITLE' | translate}}</label>
        <div class="col-md-4">
            <input class="form-control" type="text" data-ng-model="entity.title" name="title" required>
        </div>
        <div class="col-md-4 form-text">
      <span class="help-inline" data-ng-show="roleForm.title.$valid">
        <i class="icon-ok text-success"></i>
      </span>
            <span class="help-inline"
                  data-ng-show="roleForm.title.$error.required">
        {{'REQUIRED' | translate}}
      </span>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-2 col-form-label">{{'TYPE' | translate}}</label>
        <div class="col-md-2">
            <select class="form-control" data-ng-model="entity.section">
                <option value="front">{{'FRONT' | translate}}</option>
                <option value="admin">{{'ADMIN' | translate}}</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-2 col-form-label">{{'STATUS' | translate}}</label>
        <div class="col-md-4">
            <label class="form-check-label">
                <input type="radio" data-ng-model="entity.active" value="1">
                {{'ACTIVE' | translate}}
            </label>
            <label class="form-check-label">
                <input type="radio" data-ng-model="entity.active" value="0">
                {{'INACTIVE' | translate}}
            </label>
        </div>
    </div>
    <div class="form-group">
        <div class="offset-md-2 col-md-10">
            <button type="submit" class="btn btn-primary" ng-disabled="roleForm.$invalid">
                {{'SUBMIT' | translate}}
            </button>
        </div>
    </div>
</form>