<div class="container">
  <div class="row">
    <div class="content-block">
      <form #newGroupForm="ngForm">
        <h2 class="title">編輯分局</h2>
        <div class="form-group">
          <label for="groupArea">區域名稱</label>
          <span *ngIf="groupArea.invalid && (groupArea.dirty || groupArea.touched)">
            <span class="invalidMessage" *ngIf="groupArea?.errors.required">*此欄必填</span>
          </span>
          <input type="text" class="form-control" id="groupArea" name="groupArea" #groupArea="ngModel" [(ngModel)]="selectedGroup.Area"
            placeholder="區域名稱" required>
        </div>
        <div class="form-group">
          <label for="groupName">分局名稱</label>
          <span *ngIf="groupName.invalid && (groupName.dirty || groupName.touched)">
            <span class="invalidMessage" *ngIf="groupName?.errors.required">*此欄必填</span>
          </span>
          <input type="text" class="form-control" id="groupName" name="groupName" #groupName="ngModel" [(ngModel)]="selectedGroup.StationName"
            placeholder="分局名稱" required>
        </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]="!newGroupForm.form.valid" (click)="doEditGroupData()">送出
            <i class=" fa fa-chevron-right " aria-hidden="true "></i>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
