<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="core/header :: head">  <meta charset="utf-8">
</head>
<body class="hold-transition login-page">

<div class="login-box">
  <div class="login-logo">
    <a href="#">Welcome to Spring Security Course</a>  </div>
  <!-- /.login-logo -->
  <div class="card">
    <div class="card-body login-card-body">
      <div class="alert alert-danger" role="alert" th:if="${tokenError != null}">
        <p th:text="${tokenError}"></p>
      </div>
      <div class="alert alert-success" role="alert" th:if="${passwordUpdateMsg != null}">
        <p th:text="${passwordUpdateMsg}"></p>
      </div>
      <p class="login-box-msg">Change your Password</p>
      <p th:if="${loginError}" class="error"></p>
      <form th:action="@{/password/change}" method="post" th:object="${forgotPassword}">
        <div th:if="${param.error}">
        <div class="alert alert-danger">
          <span th:text="#{login.error}"/>
        </div>

      </div>
        <div class="input-group mb-3">
          <input type="password" class="form-control" th:field="*{password}" placeholder="New Password" autocomplete=”off”>
          <div class="input-group-append">
            <div class="input-group-text">
              <span class="fas fa-envelope"></span>
            </div>
          </div>
        </div>
        <div class="input-group mb-3">
          <input type="password" name="repeatPassword" class="form-control" placeholder="Repeat Password">
          <div class="input-group-append">
            <div class="input-group-text">
              <span class="fas fa-lock"></span>
            </div>
          </div>
        </div>
        <input type="hidden" th:field="*{token}"/>
        <div class="row">
          <!-- /.col -->
          <div class="col-8">
            <button type="submit" class="btn btn-primary btn-block">Change Password</button>
          </div>
          <!-- /.col -->
        </div>
      </form>
      <p class="mb-0 text-right">
        <a href="/login" class="text-center">Sign In</a>
      </p>
    </div>
    <!-- /.login-card-body -->
  </div>
</div>


<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<script src="../../plugins/jquery/jquery.min.js"></script>
</body>
</html>
