Commit 9d63f333 authored by Jon Yu's avatar Jon Yu
Browse files

Add custom password reset form

parent 160a6a7e
...@@ -14,26 +14,28 @@ ...@@ -14,26 +14,28 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<div class="card"> <div class="col-lg-6 offset-lg-3 my-4">
<div class="card-body"> <div class="card">
<form method="post" action="{% url 'login' %}"> <div class="card-body">
{% csrf_token %} <form method="post" action="{% url 'login' %}">
<div class="form-row"> {% csrf_token %}
<div class="form-group col-md-6"> <div class="form-row">
<label for="username">Username</label> <div class="form-group col-md-6">
<input class="form-control" type="text" placeholder="Username" autofocus autocapitalize="none" autocomplete="username" maxlength="150" required id="username"> <label for="username">Username</label>
<input class="form-control" type="text" placeholder="Username" autofocus autocapitalize="none" autocomplete="username" maxlength="150" required id="username">
</div>
<div class="form-group col-md-6">
<label for="password">Password</label>
<input class="form-control" type="password" placeholder="Password" autofocus autocomplete="current-password" required id="password">
</div>
</div> </div>
<div class="form-group col-md-6"> <button type="submit" class="btn btn-primary">Login</button>
<label for="password">Password</label> <input type="hidden" name="next" value="{{ next }}">
<input class="form-control" type="password" placeholder="Password" autofocus autocomplete="current-password" required id="password"> </form>
</div> </div>
</div> <div class="card-footer">
<button type="submit" class="btn btn-primary">Login</button> <a href="{% url 'password_reset' %}">Lost password?</a>
<input type="hidden" name="next" value="{{ next }}"> </div>
</form>
</div>
<div class="card-footer">
<a href="{% url 'password_reset' %}">Lost password?</a>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% extends "base.html" %}
{% block content %}
<div class="col-lg-6 offset-lg-3 my-4">
<div class="card">
<div class="card-body">
<p>Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.</p>
<form method="post" action="{% url 'password_reset' %}">
{% csrf_token %}
<fieldset>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" autocomplete="email" maxlength="254" required id="email" placeholder="Email">
</div>
<button type="submit" class="btn btn-primary">Reset my password</button>
</fieldset>
</form>
</div>
</div>
</div>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment