Coverage for ivatar/ivataraccount/templates/login.html: 85%

34 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-18 23:09 +0000

1{% extends 'base.html' %} 

2{% load i18n %} 

3  

4{% block title %}{% trans 'Login to yourivatar account' %}{% endblock title %} 

5  

6{% block content %} 

7  

8<h1>{% trans 'Login' %}</h1> 

9  

10{% if form.errors %} 

11 {% for error in form.non_field_errors %} 

12<div class="alert alert-danger" role="alert">{{ error|escape }}</div> 

13 {% endfor %} 

14{% endif %} 

15{% if form.username.errors %} 

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

17{% endif %} 

18{% if form.password.errors %} 

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

20{% endif %} 

21<div style="max-width:700px"> 

22<form action="{% url 'login' %}" method="post" name="login"> 

23{% csrf_token %} 

24<div class="form-group"> 

25<label for="id_username">{% trans 'Username' %}:</label> 

26<input type="text" name="username" autofocus required class="form-control" id="id_username"> 

27</div> 

28<div class="form-group"> 

29<label for="id_password">{% trans 'Password' %}:</label> 

30<input type="password" name="password" class="form-control" required id="id_password"> 

31</div> 

32 <button type="submit" class="button">{% trans 'Login' %}</button> 

33 &nbsp; 

34 <a href="{% url 'openid-login' %}" class="button">{% trans 'Login with OpenID' %}</a> 

35 &nbsp; 

36 <a href="{% url 'new_account' %}" class="button">{% trans 'Create new user' %}</a> 

37 &nbsp; 

38 <a href="{% url 'password_reset' %}" class="button">{% trans 'Password reset' %}</a> 

39</form> 

40</div> 

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

42{% endblock content %}