summaryrefslogtreecommitdiff
path: root/templates/proxy_vote_form.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/proxy_vote_form.html')
-rw-r--r--templates/proxy_vote_form.html105
1 files changed, 49 insertions, 56 deletions
diff --git a/templates/proxy_vote_form.html b/templates/proxy_vote_form.html
index eb5c421..3bfa9df 100644
--- a/templates/proxy_vote_form.html
+++ b/templates/proxy_vote_form.html
@@ -1,61 +1,54 @@
{{ template "header" . }}
{{ $form := .Form }}
-<table class="list">
- <thead>
- <tr>
- <th>Status</th>
- <th>Motion</th>
- </tr>
- </thead>
- <tbody>
- <tr>
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to
+ motions</a>
+ </div>
+ </div>
+</div>
+<div class="column">
+ <div class="ui raised segment">
{{ with .Decision }}
- {{ template "motion_fragment" .}}
+ {{ 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>
+ <form action="/proxy/{{ .Decision.Tag }}" method="post">
+ <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">
+ {{ range .Voters }}
+ <option value="{{ .Id }}"
+ {{ if eq (.Id | print) $form.Voter }}
+ selected{{ end }}>{{ .Name }}</option>
+ {{ end }}
+ </select>
+ </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>
+ </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>
+ {{ with .Form.Errors }}
+ <div class="ui error message">
+ {{ with .Voter }}<p>{{ . }}</p>{{ end }}
+ {{ with .Vote }}<p>{{ . }}</p>{{ end }}
+ {{ with .Justification }}<p>{{ . }}</p>{{ end }}
+ </div>
+ {{ end }}
+ <button class="ui primary left labeled icon button" type="submit"><i class="users icon"></i> Proxy Vote</button>
+ </div>
+ </form>
+ </div>
+</div>
{{ template "footer" . }} \ No newline at end of file