2022-05-26 14:47:57 +00:00
|
|
|
{{ define "title" }}New motion{{ end }}
|
2022-05-22 19:15:54 +00:00
|
|
|
|
|
|
|
{{ define "main" }}
|
2022-05-26 19:04:47 +00:00
|
|
|
<form action="/newmotion/" method="post">
|
|
|
|
<input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
|
|
|
|
<div class="ui form segment{{ if .Form.FieldErrors }} error{{ end }}">
|
|
|
|
<div class="three fields">
|
|
|
|
<div class="field">
|
|
|
|
<label>ID:</label>
|
|
|
|
(generated on submit)
|
2022-05-22 19:15:54 +00:00
|
|
|
</div>
|
2022-05-26 19:04:47 +00:00
|
|
|
<div class="field">
|
|
|
|
<label>Proponent:</label>
|
|
|
|
{{ .User.Name }}
|
2022-05-22 19:15:54 +00:00
|
|
|
</div>
|
2022-05-26 19:04:47 +00:00
|
|
|
<div class="field">
|
|
|
|
<label>Proposed date/time:</label>
|
|
|
|
(auto filled to current date/time)
|
2022-05-22 19:15:54 +00:00
|
|
|
</div>
|
2022-05-26 19:04:47 +00:00
|
|
|
</div>
|
|
|
|
<div class="required field{{ if .Form.FieldErrors.title }} error{{ end }}">
|
|
|
|
<label for="title">Title:</label>
|
|
|
|
<input id="title" name="title" type="text" value="{{ .Form.Title }}">
|
|
|
|
{{ if .Form.FieldErrors.title }}
|
|
|
|
<span class="ui small error text">{{ .Form.FieldErrors.title }}</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="required field{{ if .Form.FieldErrors.content }} error{{ end }}">
|
|
|
|
<label for="content">Text:</label>
|
|
|
|
<textarea id="content" name="content">{{ .Form.Content }}</textarea>
|
|
|
|
{{ if .Form.FieldErrors.content }}
|
|
|
|
<span class="ui small error text">{{ .Form.FieldErrors.content }}</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="two fields">
|
|
|
|
<div class="required field{{ if .Form.FieldErrors.type }} error{{ end }}">
|
|
|
|
<label for="type">Vote type:</label>
|
|
|
|
{{ $voteType := toString .Form.Type }}
|
|
|
|
<select id="type" name="type">
|
|
|
|
<option value="motion"
|
|
|
|
{{ if eq "motion" $voteType }}selected{{ end }}>
|
|
|
|
Motion
|
|
|
|
</option>
|
|
|
|
<option value="veto"
|
|
|
|
{{ if eq "veto" $voteType }}selected{{ end }}>
|
|
|
|
Veto
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
{{ if .Form.FieldErrors.type }}
|
|
|
|
<span class="ui small error text">{{ .Form.FieldErrors.type}}</span>
|
|
|
|
{{ end}}
|
|
|
|
</div>
|
|
|
|
<div class="required field{{ if .Form.FieldErrors.due }} error{{ end }}">
|
|
|
|
<label for="due">Due: (autofilled from chosen
|
|
|
|
option)</label>
|
|
|
|
<select id="due" name="due">
|
|
|
|
<option value="3"{{ if eq 3 .Form.Due }} selected{{ end }}>In 3 Days</option>
|
|
|
|
<option value="7"{{ if eq 7 .Form.Due }} selected{{ end }}>In 1 Week</option>
|
|
|
|
<option value="14"{{ if eq 14 .Form.Due }} selected{{ end }}>In 2 Weeks</option>
|
|
|
|
<option value="28"{{ if eq 28 .Form.Due }} selected{{ end }}>In 4 Weeks</option>
|
|
|
|
</select>
|
|
|
|
{{ if .Form.FieldErrors.due }}
|
|
|
|
<span class="ui small error text">{{ .Form.FieldErrors.due }}</span>
|
|
|
|
{{ end }}
|
2022-05-22 19:15:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-26 19:04:47 +00:00
|
|
|
<button class="ui button" type="submit">Propose</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2022-05-22 19:15:54 +00:00
|
|
|
{{ end }}
|