{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %}
<div class="hold-transition login-page">
    <div class="login-box">
      <div class="login-logo">
        <a></a><b>Enter new password</b></a>
      </div>
      <!-- /.login-logo -->
      <div class="card">
        <div class="card-body login-card-body">
          <p class="text-center">Please enter your new password twice.
            So we can verify you typed it in correctly.</p>
          {% if validlink %}
          <form action="" method="post">
            {% csrf_token %}
            <div class="row">
                <div class="col-12 pb-5 pt-4">
              {{ form |crispy}}
                </div></div>
                <div class="text-center">
              <button class="btn btn-primary" type="submit">Submit</button>
                </div>
        </form>
        {% else %}
        <h1>Password reset unsuccessful</h1>
        <p>The password reset link was invalid,
        possibly because it has already been used.
        Please request a new password reset.</p>
    {% endif %}
        </div>
        <!-- /.login-card-body -->
      </div>
    <!-- /.login-box -->
    
    </div>
    <script>
        (function() {
            document.getElementsByClassName('control-label')[0  ].innerHTML='New password* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
        document.getElementsByClassName('control-label')[1].innerHTML='Confirm Password*';
        })();
    </script>
  {% endblock %}