1 | <!-- $Id$ --> |
---|
2 | [% poll = c.model('Vote').poll(voteid) %] |
---|
3 | |
---|
4 | [% IF poll.status == 'BEFORE' %] |
---|
5 | <div class="box" style="float: left; width: 55%;"> |
---|
6 | <form action="[% c.uri_for(poll.uid) %]" method="POST" id="poll_f_settings"> |
---|
7 | |
---|
8 | [% l('Name:') %]<br><input type="text" name="label" value="[% c.req.param('label') || poll.info('label') | html %]"> |
---|
9 | <br> |
---|
10 | [% l('Description:') %]<br> |
---|
11 | <textarea name="description" cols="60" rows="4">[% c.req.param('description') || poll.info('description') | html %]</textarea> |
---|
12 | <br> |
---|
13 | [% l('Rules:') %]<br> |
---|
14 | <textarea name="procedure" cols="60" rows="4">[% c.req.param('procedure') || poll.info('procedure') | html %]</textarea> |
---|
15 | <br> |
---|
16 | <hr> |
---|
17 | |
---|
18 | <div id="poll_extra_settings"> |
---|
19 | [% INCLUDE 'admin/includes/poll_extra_settings.tt' |
---|
20 | pollsettings = poll.info |
---|
21 | %] |
---|
22 | </div> |
---|
23 | |
---|
24 | <hr> |
---|
25 | <input type="submit" name="pollparam" value="[% l('Save') %]"> |
---|
26 | </form> |
---|
27 | </div> |
---|
28 | |
---|
29 | [% c.prototype.observe_form('poll_f_settings', |
---|
30 | url => c.uri_for(poll.uid, 'ajaxsettings'), |
---|
31 | update => 'poll_extra_settings', |
---|
32 | frequency => 2, |
---|
33 | ) %] |
---|
34 | |
---|
35 | |
---|
36 | <!-- Crypt settings --> |
---|
37 | <div class="box" style="float:right; width: 35%"> |
---|
38 | [% IF poll.is_crypted %] |
---|
39 | <p><a href="[% c.uri_for(poll.uid, 'privatekey') %]"> |
---|
40 | [% l('Download private key') %]</a></p> |
---|
41 | <hr> |
---|
42 | <form action="[% c.uri_for(poll.uid) %]" method="POST"> |
---|
43 | <input type="submit" name="notcrypted" value="[% l('Don\'t encrypt ballot') %]"> |
---|
44 | </form> |
---|
45 | [% ELSE %] |
---|
46 | <form action="[% c.uri_for(poll.uid) %]" method="POST"> |
---|
47 | [% l('You can choose a passphrase to protect the key:') %]<br> |
---|
48 | <input type="password" name="passphrase"><br> |
---|
49 | <input type="submit" name="encrypted" value="[% l('encrypt the poll') %]"> |
---|
50 | </form> |
---|
51 | [% END %] |
---|
52 | </div> |
---|
53 | [% END %] |
---|