summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJan Dittberner <jan@dittberner.info>2017-04-19 00:05:42 +0200
committerJan Dittberner <jan@dittberner.info>2017-04-22 00:12:38 +0200
commitbc194e8943bdec58ef462e393ef2a8a59d928718 (patch)
tree1d0ecdfe5c2eb131437ced9dfd2ec44484ad3763 /templates
parentcc0f5c0b7b931440704bc31a858d52ae92585616 (diff)
downloadcacert-boardvoting-bc194e8943bdec58ef462e393ef2a8a59d928718.tar.gz
cacert-boardvoting-bc194e8943bdec58ef462e393ef2a8a59d928718.tar.xz
cacert-boardvoting-bc194e8943bdec58ef462e393ef2a8a59d928718.zip
Implement motion editing
Diffstat (limited to 'templates')
-rw-r--r--templates/create_motion_form.html (renamed from templates/newmotion_form.html)0
-rw-r--r--templates/create_motion_mail.txt7
-rw-r--r--templates/edit_motion_form.html73
-rw-r--r--templates/update_motion_mail.txt26
4 files changed, 101 insertions, 5 deletions
diff --git a/templates/newmotion_form.html b/templates/create_motion_form.html
index b7573d4..b7573d4 100644
--- a/templates/newmotion_form.html
+++ b/templates/create_motion_form.html
diff --git a/templates/create_motion_mail.txt b/templates/create_motion_mail.txt
index f26577e..b526615 100644
--- a/templates/create_motion_mail.txt
+++ b/templates/create_motion_mail.txt
@@ -1,13 +1,10 @@
-From: {{ .Sender }}
-To: {{ .Recipient }}
-Subject: {{ .Tag }} - {{ .Title }}
-
Dear Board,
{{ .Name }} has made the following motion:
{{ .Title }}
-{{ .Content }}
+
+{{ wrap 76 .Content }}
Vote type: {{ .VoteType }}
diff --git a/templates/edit_motion_form.html b/templates/edit_motion_form.html
new file mode 100644
index 0000000..d17389c
--- /dev/null
+++ b/templates/edit_motion_form.html
@@ -0,0 +1,73 @@
+{{ template "header" . }}
+<form action="/motions/{{ .Form.Decision.Tag }}/edit" method="post">
+ <table>
+ <tr>
+ <td>ID:</td>
+ <td>{{ .Form.Decision.Tag }}</td>
+ </tr>
+ <tr>
+ <td>Proponent:</td>
+ <td>{{ .Voter.Name }}</td>
+ </tr>
+ <tr>
+ <td>Proposed date/time:</td>
+ <td>{{ .Form.Decision.Proposed }}</td>
+ </tr>
+ <tr>
+ <td>Title:</td>
+ <td><input name="Title" value="{{ .Form.Title }}"/>
+ {{ with .Form.Errors.Title }}
+ <span class="error">{{ . }}</span>
+ {{ end }}
+ </td>
+ </tr>
+ <tr>
+ <td>Text:</td>
+ <td><textarea name="Content">{{ .Form.Content }}</textarea>
+ {{ with .Form.Errors.Content }}
+ <span class="error">{{ . }}</span>
+ {{ end }}
+ </td>
+ </tr>
+ <tr>
+ <td>Vote type:</td>
+ <td>
+ <select name="VoteType">
+ <option value="0"
+ {{ if eq "0" .Form.VoteType }}selected{{ end }}>
+ Motion
+ </option>
+ <option value="1"
+ {{ if eq "1" .Form.VoteType }}selected{{ end }}>Veto
+ </option>
+ </select>
+ {{ with .Form.Errors.VoteType }}
+ <span class="error">{{ . }}</span>
+ {{ end }}
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">Due:</td>
+ <td>(autofilled from option below)</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="Due">
+ <option value="+3 days">In 3 Days</option>
+ <option value="+7 days">In 1 Week</option>
+ <option value="+14 days">In 2 Weeks</option>
+ <option value="+28 days">In 4 Weeks</option>
+ </select>
+ {{ with .Form.Errors.Due }}
+ <span class="error">{{ . }}</span>
+ {{ end }}
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="Propose"/></td>
+ </tr>
+ </table>
+</form>
+<a href="/motions/">Back to motions</a>
+{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/update_motion_mail.txt b/templates/update_motion_mail.txt
new file mode 100644
index 0000000..ddb0996
--- /dev/null
+++ b/templates/update_motion_mail.txt
@@ -0,0 +1,26 @@
+Dear Board,
+
+{{ .Name }} has modified motion {{ .Tag }} to the following:
+
+{{ .Title }}
+
+{{ wrap 76 .Content }}
+
+Vote type: {{ .VoteType }}
+
+Voting will close {{ .Due }}
+
+To vote please choose:
+
+Aye: {{ .VoteURL }}/aye
+Naye: {{ .VoteURL }}/naye
+Abstain: {{ .VoteURL }}/abstain
+
+Please be aware, that if you have voted already your vote is still
+registered and valid. If this modification has an impact on how you wish to
+vote, you are responsible for voting again.
+
+To see all your pending votes: {{ .UnvotedURL }}
+
+Kind regards,
+the voting system \ No newline at end of file