diff options
Diffstat (limited to 'templates/changepw')
-rw-r--r-- | templates/changepw/reset_password.html | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/templates/changepw/reset_password.html b/templates/changepw/reset_password.html index d231f51..c225b8d 100644 --- a/templates/changepw/reset_password.html +++ b/templates/changepw/reset_password.html @@ -4,15 +4,27 @@ {% block title %}Password reset{% endblock %} {% block content %} <h2>Password reset</h2> -{% if return_value == 0 %} +{% if not return_value %} <p>Here is your new password:</p> <table> <tr> <th>Username:</th><td>{{ username }}</td> </tr> - <tr> - <th>Password:</th><td>{{ new_password }}</td> - </tr> + {% if new_password %} + <tr> + <th>Password:</th><td>{{ new_password }}</td> + </tr> + {% else %} + <tr> + <th>Password:</th> + <td> + <form action="{% url changepw %}" method="post"> + {% csrf_token %} + <input type="submit" value="Generate" /> + </form> + </td> + </tr> + {% endif %} </table> {% else %} <p>Something went wrong. Please contact an administrator.</p> |