Coverage for ivatar/ivataraccount/templates/password_change.html: 97%

33 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2024-12-26 00:11 +0000

1{% extends 'base.html' %}  

2{% load i18n %} 

3  

4{% block title %}{% trans 'Change your ivatar password' %}{% endblock title %} 

5  

6{% block content %} 

7{% if validlink or form.old_password %} 

8<h1>{% trans 'Change password' %}</h1> 

9{% if form.old_password.errors %} 

10<div class="alert alert-danger" role="alert">{{ form.old_password.errors }}</div> 

11{% endif %} 

12{% if form.new_password1.errors %} 

13<div class="alert alert-danger" role="alert">{{ form.new_password1.errors }}</div> 

14{% endif %} 

15{% if form.new_password2.errors %} 

16<div class="alert alert-danger" role="alert">{{ form.new_password2.errors }}</div> 

17{% endif %} 

18<form action="" method="post" name="changepassword"> 

19{% csrf_token %} 

20<div style="max-width:640px"> 

21{% if form.old_password %} 

22<div class="form-group"> 

23<label for="id_old_password">{% trans 'Old password' %}:</label> 

24<input type="password" name="old_password" autofocus required class="form-control" id="id_old_password"> 

25</div> 

26{% endif %} 

27<div class="form-group"> 

28<label for="id_new_password1">{% trans 'New password' %}:</label> 

29<input type="password" name="new_password1" class="form-control" required id="id_new_password1"> 

30</div> 

31<div class="form-group"> 

32<label for="id_new_password2">{% trans 'New password confirmation' %}:</label> 

33<input type="password" name="new_password2" class="form-control" required id="id_new_password2"> 

34</div> 

35<button type="submit" class="button">{% trans 'Change my password' %}</button> 

36</form> 

37</div> 

38{% else %} 

39<div class="alert alert-danger" role="alert"> 

40<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> 

41</div> 

42{% endif %} 

43<div style="height:40px"></div> 

44{% endblock content %}