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