[227] | 1 | <!-- $Id$ --> |
---|
[169] | 2 | [% INCLUDE 'includes/admin_menu.tt' %] |
---|
| 3 | |
---|
| 4 | [% poll = c.model('Vote').poll(voteid) %] |
---|
| 5 | |
---|
[217] | 6 | <div style="float: left; width: 55%" class="box"> |
---|
[226] | 7 | <form action="[% c.uri_for(poll.uid, 'ballot') %]" method="POST"> |
---|
[217] | 8 | <table border=1> |
---|
| 9 | <tr> |
---|
[280] | 10 | <td>[% l('Number of possible choice:') %]</td> |
---|
[217] | 11 | <td><input type="text" size="3" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]"></td> |
---|
| 12 | </tr> |
---|
| 13 | |
---|
| 14 | <tr> |
---|
[296] | 15 | <td>[% l('Number of people to elect') %]<br> |
---|
[280] | 16 | ([% l('if different of number of choice') %]) |
---|
| 17 | </td> |
---|
[217] | 18 | <td><input type="text" size="3" name="elected_count" value="[% c.req.param('elected_count') || poll.raw_info('elected_count') | html %]"></td> |
---|
| 19 | </tr> |
---|
| 20 | |
---|
| 21 | <tr> |
---|
[296] | 22 | <td>[% l('Number of free input fields:') %]</td> |
---|
[217] | 23 | <td><input type="text" size="3" name="free_choice" value="[% c.req.param('free_choice') || poll.info('free_choice') || 0 | html %]"></td> |
---|
| 24 | </tr> |
---|
| 25 | |
---|
[221] | 26 | <tr> |
---|
[296] | 27 | <td>[% l('Number of people to elect, taken from voting list') %]</td> |
---|
[221] | 28 | <td><input type="text" size="3" name="elected_choice" value="[% c.req.param('elected_choice') || poll.info('elected_choice') || 0 | html %]"></td> |
---|
| 29 | </tr> |
---|
| 30 | |
---|
[217] | 31 | </table> |
---|
[280] | 32 | <input type="submit" name="pollballot" value="[% l('save') %]"> |
---|
[169] | 33 | </form> |
---|
| 34 | |
---|
| 35 | <hr> |
---|
| 36 | |
---|
[207] | 37 | [% IF ! poll.choices_keys.size %] |
---|
[280] | 38 | <p class="alert">[% l('No choice are configured') %]</p> |
---|
[169] | 39 | [% ELSE %] |
---|
[207] | 40 | [% FOREACH choicek = poll.choices_keys %] |
---|
| 41 | [% choice = poll.choice(choicek) %] |
---|
[226] | 42 | <form action="[% c.uri_for(poll.uid, 'ballot') %]" method="POST"> |
---|
[207] | 43 | [% loop.count %] - [% choice.info.label | html %] |
---|
| 44 | <input type="hidden" name="delch" value="[% choicek %]"> |
---|
[280] | 45 | <input type="submit" name="del" value="[% l('delete') %]"> |
---|
[169] | 46 | </form> |
---|
| 47 | <br> |
---|
| 48 | [% END %] |
---|
| 49 | [% END %] |
---|
[226] | 50 | <form action="[% c.uri_for(poll.uid, 'ballot') %]" method="POST"> |
---|
[280] | 51 | [% l('Add a choice') %]<br> |
---|
[169] | 52 | <input type="text" name="addch"> |
---|
[280] | 53 | <input type="submit" value="[% l('Add') %]"> |
---|
[169] | 54 | </form> |
---|
| 55 | </div> |
---|
| 56 | |
---|
| 57 | <div style="float: right; width: 30%" class="ballot"> |
---|
[280] | 58 | <p>[% l('Preview of ballot') %]</p> |
---|
[235] | 59 | [% INCLUDE 'includes/ballot_form.tt' b_form_url = c.uri_for(poll.uid, 'ballot') %] |
---|
[169] | 60 | </div> |
---|
| 61 | |
---|
| 62 | <div style="clear: both"></div> |
---|