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

39 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-17 23:12 +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{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %} 

25<div class="form-group"> 

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

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

28</div> 

29<div class="form-group"> 

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

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

32</div> 

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

34 &nbsp; 

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

36 {% if with_fedora %} 

37 &nbsp; 

38 <a href="{% url "social:begin" "fedora" %}" class="button">{% trans 'Login with Fedora' %}</a> 

39 {% endif %} 

40 &nbsp; 

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

42 &nbsp; 

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

44</form> 

45</div> 

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

47{% endblock content %}