diff options
author | Jan Dittberner <jan@dittberner.info> | 2017-04-18 02:34:21 +0200 |
---|---|---|
committer | Jan Dittberner <jan@dittberner.info> | 2017-04-22 00:12:32 +0200 |
commit | 471daf12ea98aa2a7fcb11deff9697403c5dd6a5 (patch) | |
tree | 995daa7635955bef5b973f38ecf88cf3b2a2d82f /templates | |
parent | 57e3d5324559255e57655f71b333edc6c54fabdf (diff) | |
download | cacert-boardvoting-471daf12ea98aa2a7fcb11deff9697403c5dd6a5.tar.gz cacert-boardvoting-471daf12ea98aa2a7fcb11deff9697403c5dd6a5.tar.xz cacert-boardvoting-471daf12ea98aa2a7fcb11deff9697403c5dd6a5.zip |
Partialy add new motion creation
Diffstat (limited to 'templates')
-rw-r--r-- | templates/header.html | 7 | ||||
-rw-r--r-- | templates/newmotion_form.html | 73 |
2 files changed, 80 insertions, 0 deletions
diff --git a/templates/header.html b/templates/header.html index 5f777bb..a6fc69e 100644 --- a/templates/header.html +++ b/templates/header.html @@ -12,4 +12,11 @@ CAcert Board Decisions{{ if .PageTitle }} - {{ .PageTitle }}{{ end}} </head> <body> <h1>{{ template "pagetitle" . }}</h1> +{{ with .Flashes }} +<ul class="flash-messages"> +{{ range . }} + <li>{{ . }}</li> +{{ end }} +</ul> +{{ end }} {{ end }}
\ No newline at end of file diff --git a/templates/newmotion_form.html b/templates/newmotion_form.html new file mode 100644 index 0000000..b7573d4 --- /dev/null +++ b/templates/newmotion_form.html @@ -0,0 +1,73 @@ +{{ template "header" . }} +<form action="/newmotion/" method="post"> + <table> + <tr> + <td>ID:</td> + <td>(generated on submit)</td> + </tr> + <tr> + <td>Proponent:</td> + <td>{{ .Voter.Name }}</td> + </tr> + <tr> + <td>Proposed date/time:</td> + <td>(auto filled to current date/time)</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> </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 |