<div class="container">
  <div class="row">
    <div class="content-block">
      <form #newRoleForm="ngForm">
        <h2 class="title">新增權限</h2>
        <div class="form-group">
          <label for="roleName">權限名稱</label>
          <span *ngIf="roleName.invalid && (roleName.dirty || roleName.touched)">
            <span class="invalidMessage" *ngIf="roleName?.errors.required">*此欄必填</span>
          </span>
          <input type="text" class="form-control" id="roleName" name="roleName" #roleName="ngModel" required [(ngModel)]="roleData.RoleName"
            placeholder="權限名稱">
        </div>
        <div class="btn-footer">
          <button type="submit" class="btn btn-danger" (click)="backPreviousPage()">
            <i class=" fa fa-chevron-left " aria-hidden="true "></i>
            回上一頁
          </button>
          <button type="submit" class="btn btn-success" [disabled]="!newRoleForm.form.valid" (click)="createNewRole()">送出
            <i class=" fa fa-chevron-right " aria-hidden="true "></i>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
