blob: 97fcac561e863bb14636636c06aff930a6a2ca69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<table class="vote-table">
<tr>
<th></th>
{% for choice in choices %}
<th>
{% include "poll_choice_datetime_range.html.j2" %}
<span>
<i>{{ choice.votes | length }} votes</i>
</span>
</th>
{% endfor %}
</tr>
{% for voter_name in voter_names %}
<tr>
<td>{{ voter_name }}</td>
{% for choice in choices %}
{% if selections[(voter_name, choice.id)] == 1 %}
<td>
<input type="checkbox" checked disabled>
</td>
{% elif selections[(voter_name, choice.id)] == 0 %}
<td>
<input type="checkbox" disabled>
</td>
{% else %}
<td>
??
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
<!-- Add a row for the current user -->
<tr>
<td>
<label for="voter_name" hidden>Your name</label>
<input type="text" name="voter_name" placeholder="Your name" required>
</td>
{% for choice in choices %}
<td>
<input type="checkbox" name="choice_{{ choice.id }}">
</td>
{% endfor %}
</tr>
<!-- End of the row for the current user -->
</table>
<input class="green" type="submit" value="Submit">
|