{% extends 'base.html' %}

{% block title %}<title>Reset Password</title>{% endblock %}

{% block container %}
<main>
  <div class="container py-5">
    <div class="row justify-content-center">
      <div class="col-md-6 col-lg-4">
        <div class="text-center mb-5">
          <h1 class="fw-bold h2">Reset Password</h1>
        </div>

        <form id="resetPasswordForm" onsubmit="return false;">
          <input type="hidden" name="token" value="{{urlParams.token}}">
          <input type="hidden" name="code" value="{{urlParams.code}}">
          <div class="form-floating mb-3">
            <input type="email" name="email" class="form-control border-dark" id="regEmail" value="{{urlParams.email}}" placeholder="name@example.com" readonly required>
            <label for="regEmail">Email</label>
          </div>
          <div class="form-floating mb-4">
            <input type="password" name="password" class="form-control border-dark" id="regPassword" placeholder="New Password" required>
            <label for="regPassword">New Password</label>
          </div>

          <div class="d-grid gap-3 mb-4">
            <button type="submit" class="btn btn-dark py-3">Reset Password</button>
            <a href="{% system with name='BaseUrl' %}/login" class="text-center text-dark small text-decoration-underline">Back to Login</a>
          </div>
        </form>
      </div>
    </div>
  </div>
</main>
{% endblock %}