Use static assets for HTML templates
[cacert-boardvoting.git] / boardvoting / templates / edit_motion_form.html
1 {{ template "header.html" . }}
2 <div class="column">
3 <div class="ui floated right secondary menu">
4 <a href="/motions/" class="item" title="Show all votes">Back to
5 motions</a>
6 </div>
7 </div>
8 <div class="column">
9 <div class="ui raised segment">
10 <form action="/motions/{{ .Form.Decision.Tag }}/edit" method="post">
11 <div class="ui form{{ if .Form.Errors }} error{{ end }}">
12 <div class="three fields">
13 <div class="field">
14 <label>ID:</label>
15 <a href="/motions/{{ .Form.Decision.Tag }}">{{ .Form.Decision.Tag }}</a>
16 </div>
17 <div class="field">
18 <label>Proponent:</label>
19 {{ .Voter.Name }}
20 </div>
21 <div class="field">
22 <label>Proposed date/time:</label>
23 {{ .Form.Decision.Proposed|date "2006-01-02 15:04:05 UTC" }}
24 </div>
25 </div>
26 <div class="required field{{ if .Form.Errors.Title }} error{{ end }}">
27 <label for="Title">Title:</label>
28 <input name="Title" type="text" value="{{ .Form.Title }}">
29 </div>
30 <div class="required field{{ if .Form.Errors.Content }} error{{ end }}">
31 <label for="Content">Text:</label>
32 <textarea name="Content">{{ .Form.Content }}</textarea>
33 </div>
34 <div class="two fields">
35 <div class="required field{{ if .Form.Errors.VoteType }} error{{ end }}">
36 <label for="VoteType">Vote type:</label>
37 <select name="VoteType">
38 <option value="0"
39 {{ if eq "0" .Form.VoteType }}selected{{ end }}>
40 Motion
41 </option>
42 <option value="1"
43 {{ if eq "1" .Form.VoteType }}selected{{ end }}>
44 Veto
45 </option>
46 </select>
47 </div>
48 <div class="required field{{ if .Form.Errors.Due }} error{{ end }}">
49 <label for="Due">Due: (autofilled from chosen
50 option)</label>
51 <select name="Due">
52 <option value="+3 days">In 3 Days</option>
53 <option value="+7 days">In 1 Week</option>
54 <option value="+14 days">In 2 Weeks</option>
55 <option value="+28 days">In 4 Weeks</option>
56 </select>
57 </div>
58 </div>
59 {{ with .Form.Errors }}
60 <div class="ui error message">
61 {{ with .Title }}<p>{{ . }}</p>{{ end }}
62 {{ with .Content }}<p>{{ . }}</p>{{ end }}
63 {{ with .VoteType }}<p>{{ . }}</p>{{ end }}
64 {{ with .Due }}<p>{{ . }}</p>{{ end }}
65 </div>
66 {{ end }}
67 <button class="ui button" type="submit">Propose</button>
68 </div>
69 </form>
70 </div>
71 </div>
72 {{ template "footer.html" . }}