cacert-boardvoting/boardvoting/templates/proxy_vote_form.html

47 lines
2.2 KiB
HTML
Raw Permalink Normal View History

{{ template "header.html" . }}
{{ template "return_header" . }}
2017-04-21 00:25:49 +00:00
{{ $form := .Form }}
<div class="ui raised segment">
2018-03-31 08:50:06 +00:00
{{ with .Decision }}
2017-04-30 00:37:29 +00:00
{{ template "motion_fragment" . }}
{{ end }}
<form action="/proxy/{{ .Decision.Tag }}" method="post">
2018-03-31 08:50:06 +00:00
{{ csrfField }}
<div class="ui form{{ if .Form.Errors }} error{{ end }}">
<div class="two fields">
<div class="required field{{ if .Form.Errors.Voter }} error{{ end }}">
<label for="Voter">Voter</label>
<select name="Voter">
2018-03-31 08:50:06 +00:00
{{ range .Voters }}
2017-04-30 00:37:29 +00:00
<option value="{{ .Id }}"
{{ if eq (.Id | print) $form.Voter }}
selected{{ end }}>{{ .Name }}</option>
2018-03-31 08:50:06 +00:00
{{ end }}
</select>
2017-04-30 00:37:29 +00:00
</div>
<div class="required field{{ if .Form.Errors.Vote }} error{{ end }}">
<label for="Vote">Vote</label>
<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>
2017-04-30 00:37:29 +00:00
</div>
</div>
<div class="required field{{ if .Form.Errors.Justification }} error{{ end }}">
<label for="Justification">Justification</label>
<textarea name="Justification" rows="2">{{ .Form.Justification }}</textarea>
</div>
2018-03-31 08:50:06 +00:00
{{ with .Form.Errors }}
2017-04-30 00:37:29 +00:00
<div class="ui error message">
{{ with .Voter }}<p>{{ . }}</p>{{ end }}
{{ with .Vote }}<p>{{ . }}</p>{{ end }}
{{ with .Justification }}<p>{{ . }}</p>{{ end }}
2017-04-30 00:37:29 +00:00
</div>
2018-03-31 08:50:06 +00:00
{{ end }}
<button class="ui primary left labeled icon button" type="submit"><i class="users icon"></i> Proxy Vote
</button>
</div>
</form>
2017-04-30 00:37:29 +00:00
</div>
{{ template "footer.html" . }}