summaryrefslogtreecommitdiff
path: root/templates/proxy_vote_form.html
blob: eb5c4212f204fe201519c551cf054ecf6e30ebc1 (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
50
51
52
53
54
55
56
57
58
59
60
61
{{ template "header" . }}
{{ $form := .Form }}
<table class="list">
    <thead>
    <tr>
        <th>Status</th>
        <th>Motion</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        {{ with .Decision }}
        {{ template "motion_fragment" .}}
        {{ end }}
    </tr>
    </tbody>
</table>
<form action="/proxy/{{ .Decision.Tag }}" method="post">
    <table>
        <tr>
            <th>Voter</th>
            <th>Vote</th>
        </tr>
        <tr>
            <td>
                <select name="Voter">
                    {{ range .Voters }}
                    <option value="{{ .Id }}"
                            {{ if eq (.Id | print) $form.Voter }}
                            selected{{ end }}>{{ .Name }}</option>
                    {{ end }}
                </select>
            </td>
            <td>
                <select name="Vote">
                    <option value="1"{{ if eq $form.Vote "1" }}
                            selected{{ end }}>Aye
                    </option>
                    <option value="0"{{ if eq $form.Vote "0" }}
                            selected{{ end }}>Abstain
                    </option>
                    <option value="-1"{{ if eq $form.Vote "-1" }}
                            selected{{ end }}>Naye
                    </option>
                </select>
            </td>
        </tr>
        <tr>
            <th colspan="2">Justification:</th>
        </tr>
        <tr>
            <td colspan="2"><textarea
                    name="Justification">{{ $form.Justification }}</textarea>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="Proxy Vote"></td>
        </tr>
    </table>
</form>
{{ template "footer" . }}