3bfa9df6eb05af82c983dc584503f6fd1a0b1067
[cacert-boardvoting.git] / boardvoting / templates / proxy_vote_form.html
1 {{ template "header" . }}
2 {{ $form := .Form }}
3 <div class="column">
4 <div class="ui basic segment">
5 <div class="ui floated right secondary menu">
6 <a href="/motions/" class="item" title="Show all votes">Back to
7 motions</a>
8 </div>
9 </div>
10 </div>
11 <div class="column">
12 <div class="ui raised segment">
13 {{ with .Decision }}
14 {{ template "motion_fragment" . }}
15 {{ end }}
16 <form action="/proxy/{{ .Decision.Tag }}" method="post">
17 <div class="ui form{{ if .Form.Errors }} error{{ end }}">
18 <div class="two fields">
19 <div class="required field{{ if .Form.Errors.Voter }} error{{ end }}">
20 <label for="Voter">Voter</label>
21 <select name="Voter">
22 {{ range .Voters }}
23 <option value="{{ .Id }}"
24 {{ if eq (.Id | print) $form.Voter }}
25 selected{{ end }}>{{ .Name }}</option>
26 {{ end }}
27 </select>
28 </div>
29 <div class="required field{{ if .Form.Errors.Vote }} error{{ end }}">
30 <label for="Vote">Vote</label>
31 <select name="Vote">
32 <option value="1"{{ if eq .Form.Vote "1" }} selected{{ end }}>Aye</option>
33 <option value="0"{{ if eq .Form.Vote "0" }} selected{{ end }}>Abstain</option>
34 <option value="-1"{{ if eq .Form.Vote "-1" }} selected{{ end }}>Naye</option>
35 </select>
36 </div>
37 </div>
38 <div class="required field{{ if .Form.Errors.Justification }} error{{ end }}">
39 <label for="Justification">Justification</label>
40 <textarea name="Justification" rows="2">{{ .Form.Justification }}</textarea>
41 </div>
42 {{ with .Form.Errors }}
43 <div class="ui error message">
44 {{ with .Voter }}<p>{{ . }}</p>{{ end }}
45 {{ with .Vote }}<p>{{ . }}</p>{{ end }}
46 {{ with .Justification }}<p>{{ . }}</p>{{ end }}
47 </div>
48 {{ end }}
49 <button class="ui primary left labeled icon button" type="submit"><i class="users icon"></i> Proxy Vote</button>
50 </div>
51 </form>
52 </div>
53 </div>
54 {{ template "footer" . }}