Implement proxy voting
[cacert-boardvoting.git] / templates / proxy_vote_form.html
1 {{ template "header" . }}
2 {{ $form := .Form }}
3 <table class="list">
4 <thead>
5 <tr>
6 <th>Status</th>
7 <th>Motion</th>
8 </tr>
9 </thead>
10 <tbody>
11 <tr>
12 {{ with .Decision }}
13 {{ template "motion_fragment" .}}
14 {{ end }}
15 </tr>
16 </tbody>
17 </table>
18 <form action="/proxy/{{ .Decision.Tag }}" method="post">
19 <table>
20 <tr>
21 <th>Voter</th>
22 <th>Vote</th>
23 </tr>
24 <tr>
25 <td>
26 <select name="Voter">
27 {{ range .Voters }}
28 <option value="{{ .Id }}"
29 {{ if eq (.Id | print) $form.Voter }}
30 selected{{ end }}>{{ .Name }}</option>
31 {{ end }}
32 </select>
33 </td>
34 <td>
35 <select name="Vote">
36 <option value="1"{{ if eq $form.Vote "1" }}
37 selected{{ end }}>Aye
38 </option>
39 <option value="0"{{ if eq $form.Vote "0" }}
40 selected{{ end }}>Abstain
41 </option>
42 <option value="-1"{{ if eq $form.Vote "-1" }}
43 selected{{ end }}>Naye
44 </option>
45 </select>
46 </td>
47 </tr>
48 <tr>
49 <th colspan="2">Justification:</th>
50 </tr>
51 <tr>
52 <td colspan="2"><textarea
53 name="Justification">{{ $form.Justification }}</textarea>
54 </td>
55 </tr>
56 <tr>
57 <td colspan="2"><input type="submit" value="Proxy Vote"></td>
58 </tr>
59 </table>
60 </form>
61 {{ template "footer" . }}