<!-- 宣告我們要套用模板 -->
{% extends "sign_in_base.html" %}
{% block script %}
    <script src="../static/js/reset_pwd2.js"></script>
{% endblock %}

{% block style %}
    <style>
      .form-signin {
         max-width: 330px;
         padding: 15px;
      }

      .form-signin .form-floating:focus-within {
         z-index: 2;
      }

      .form-signin input[type="email"] {
         margin-bottom: -1px;
         border-bottom-right-radius: 0;
         border-bottom-left-radius: 0;
      }

      .form-signin input[type="password"] {
         margin-bottom: 10px;
         border-top-left-radius: 0;
         border-top-right-radius: 0;
      }
    </style>   
{% endblock %}
 
    
{% block main %} 
  <form  form method="post" action="/reset_password">
    <img class="mb-4" src="../static/img/ALMIGHTY_RAY.jpg" alt="" >
    <img class="mb-4" src="../static/img/SKYAI.jpg" alt="" >
    <h1 class="h3 mb-3 fw-normal">Reset password</h1>
    <h1 class="h5 mb-5 fw-normal">create a new password</h1>  
    <div class="form-floating">
      <input type="password" class="form-control" id="new_pwd" name="new_pwd" placeholder="新密碼/New password" minlength="6"
       maxlength="12"required>
      <label for="new_pwd">新密碼/New password</label>
    </div>
    <div class="form-floating">
      <input type="password" class="form-control" id="confirm_pwd" name="confirm_pwd" placeholder="確認密碼/Confirm password" minlength="6"
       maxlength="12" oninput="setCustomValidity('');" onchange="if(document.getElementById('new_pwd').value != document.getElementById('confirm_pwd').value){setCustomValidity('密碼不吻合');}"required>
      <label for="confirm_pwd">確認密碼/Confirm password</label>
    </div>
    <div class="checkbox mb-3">
      <label>
      </label>
    </div>
    <button class="w-40 btn btn-lg btn-secondary" type="submit">Confirm</button>
    <button class="w-40 btn btn-lg btn-secondary" type="button" onclick="ResetPassword();">Cancel</button>
  </form>
{% endblock %}