<html class="login-bg">
<div class="app flex-row align-items-center">
  <div class="container">
    <div class="row justify-content-center">
      <h1 class="loginPageTitle">智慧違規偵測整合平台</h1>
      <div class="col-md-8">
        <div class="card-group mb-0">
          <div class="card loginCard p-4">
            <div class="card-body">
              <h1 class="loginCard-title">忘記密碼</h1>
              <p class="text-muted">寄送新密碼至您的信箱</p>
              <form #signupForm="ngForm">
                <div class="form-group">
                  <span *ngIf="account.invalid && (account.dirty || account.touched)">
                    <span class="invalidMessage" *ngIf="account?.errors.required">*此欄必填</span>
                  </span>
                  <input type="text" class="form-control" id="account" name="account" #account="ngModel" required [(ngModel)]="newPwdMailData.MailTo_Acct"
                    placeholder="帳號">
                </div>
                <div class="form-group">
                  <span *ngIf="email.invalid && (email.dirty || email.touched)">
                    <span class="invalidMessage" *ngIf="email?.errors.required">*此欄必填</span>
                    <span class="invalidMessage" *ngIf="email?.errors.pattern">請輸入正確信箱格式</span>
                  </span>
                  <input type="email" class="form-control" id="email" name="email" #email="ngModel" required pattern="[^ @]*@[^ @]*" [(ngModel)]="newPwdMailData.MailTo_Add"
                    placeholder="信箱">
                </div>
                <div class="row">
                  <div class="col-6">
                    <button type="button" class="btn btn-bar btn-danger px-4" routerLink="/login">回登入頁</button>
                    <button type="button" class="btn btn-bar btn-success px-4" [disabled]="!signupForm.form.valid" (click)="doLogin()">申請新密碼</button>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

</html>
