Coverage for ivatar/ivataraccount/templates/upload_photo.html: 0%

20 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{% load static %} 

4  

5{% block title %}{% trans 'Upload a new photo' %}{% endblock title %} 

6  

7{% block header %}<link rel="prefetch" href="{% static 'css/jcrop.css' %}"> 

8<link rel="prefetch" href="{% static '/js/jcrop.js' %}">{% endblock header %} 

9  

10{% block content %} 

11 <h1>{% trans 'Upload a new photo' %}</h1> 

12  

13 <form enctype="multipart/form-data" action="{% url 'upload_photo' %}" method="post">{% csrf_token %} 

14 {% if email %}<input type="hidden" name="email" value="{{ email }}">{% endif %} 

15 {% if openid %}<input type="hidden" name="openid" value="{{ openid }}">{% endif %} 

16  

17{% if form.photo.errors %} 

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

19{% endif %} 

20<div class="form-group"> 

21<label for="id_photo">{% trans 'Photo' %}:</label> 

22<span class="button uploadbtn" style="display:flex;width:14rem;padding:0;height:36px;position:relative;align-items:center"> 

23<input type="file" name="photo" required id="id_photo" accept="image/*" style="opacity:0;width:100%;height:100%;float:left"> 

24<label for="id_photo">{% trans 'Select Photo' %}</label> 

25</span> 

26</div> 

27 {% blocktrans with max_file_size|filesizeformat as max_size %}Maximum file size of {{ max_size }}.{% endblocktrans %}</p> 

28  

29<div class="form-group"> 

30<div class="checkbox"> 

31<input type="checkbox" name="not_porn" checked required id="id_not_porn"> 

32<label for="id_not_porn"><b>{% trans 'required' %}</b>; {% trans 'suitable for all ages (i.e. no offensive content)' %}</label> 

33</div> 

34</div> 

35<div class="form-group"> 

36<div class="checkbox"> 

37<input type="checkbox" name="can_distribute" checked required id="id_can_distribute"> 

38<label for="id_can_distribute"><b>{% trans 'required' %}</b>; {% trans 'can be freely copied' %}</label> 

39</div> 

40</div> 

41 <button type="submit" class="button">{% trans 'Upload' %}</button> 

42 </form> 

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

44{% endblock content %}