[176] | 1 | <!-- $Id$ --> |
---|
| 2 | [% poll = c.model('Vote').poll(voteid) %] |
---|
| 3 | |
---|
[205] | 4 | [% IF poll.status == 'BEFORE' %] |
---|
[176] | 5 | <div class="box" style="float: left; width: 55%;"> |
---|
[267] | 6 | <form action="[% c.uri_for(poll.uid) %]" method="POST" id="poll_f_settings"> |
---|
[176] | 7 | |
---|
[282] | 8 | [% l('Name:') %]<br><input type="text" name="label" value="[% c.req.param('label') || poll.info('label') | html %]"> |
---|
[176] | 9 | <br> |
---|
[282] | 10 | [% l('Description:') %]<br> |
---|
[206] | 11 | <textarea name="description" cols="60" rows="4">[% c.req.param('description') || poll.info('description') | html %]</textarea> |
---|
[176] | 12 | <br> |
---|
[282] | 13 | [% l('Rules:') %]<br> |
---|
[229] | 14 | <textarea name="procedure" cols="60" rows="4">[% c.req.param('procedure') || poll.info('procedure') | html %]</textarea> |
---|
| 15 | <br> |
---|
[176] | 16 | <hr> |
---|
[267] | 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> |
---|
[375] | 25 | <input type="submit" name="pollparam" value="[% l('Save') %]"> |
---|
[176] | 26 | </form> |
---|
| 27 | </div> |
---|
[217] | 28 | |
---|
[267] | 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 | |
---|
[217] | 36 | <!-- Crypt settings --> |
---|
[176] | 37 | <div class="box" style="float:right; width: 35%"> |
---|
| 38 | [% IF poll.is_crypted %] |
---|
[282] | 39 | <p><a href="[% c.uri_for(poll.uid, 'privatekey') %]"> |
---|
| 40 | [% l('Download private key') %]</a></p> |
---|
[176] | 41 | <hr> |
---|
[226] | 42 | <form action="[% c.uri_for(poll.uid) %]" method="POST"> |
---|
[323] | 43 | <input type="submit" name="notcrypted" value="[% l('Don\'t encrypt ballot') %]"> |
---|
[176] | 44 | </form> |
---|
| 45 | [% ELSE %] |
---|
[226] | 46 | <form action="[% c.uri_for(poll.uid) %]" method="POST"> |
---|
[282] | 47 | [% l('You can choose a passphrase to protect the key:') %]<br> |
---|
[187] | 48 | <input type="password" name="passphrase"><br> |
---|
[323] | 49 | <input type="submit" name="encrypted" value="[% l('encrypt the poll') %]"> |
---|
[176] | 50 | </form> |
---|
| 51 | [% END %] |
---|
| 52 | </div> |
---|
[185] | 53 | [% END %] |
---|