1 | [% INCLUDE 'includes/admin_menu.tt' %] |
---|
2 | |
---|
3 | [% vote = c.model('Vote') %] |
---|
4 | [% poll = c.model('Vote').poll(voteid) %] |
---|
5 | |
---|
6 | <div style="float: left; width: 35%" class="box"> |
---|
7 | <form action="[% c.uri_for(voteid, 'ballot') %]"> |
---|
8 | Nombre de choix possible: |
---|
9 | <input type="text" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]"> |
---|
10 | <br> |
---|
11 | Nombre de choix libres: |
---|
12 | <input type="text" name="free_choice" value="[% c.req.param('free_choice') || poll.info('free_choice') || 0 | html %]"> |
---|
13 | <br> |
---|
14 | <input type="submit" name="pollparam" value="Enregistrer"> |
---|
15 | </form> |
---|
16 | |
---|
17 | <hr> |
---|
18 | |
---|
19 | [% IF ! poll.choices_keys.size %] |
---|
20 | <p class="alert">Aucun choix configuré</p> |
---|
21 | [% ELSE %] |
---|
22 | [% FOREACH choicek = poll.choices_keys %] |
---|
23 | [% choice = poll.choice(choicek) %] |
---|
24 | <form action="[% c.uri_for(voteid, 'ballot') %]" method="POST"> |
---|
25 | [% loop.count %] - [% choice.info.label | html %] |
---|
26 | <input type="hidden" name="delch" value="[% choicek %]"> |
---|
27 | <input type="submit" name="del" value="Effacer"> |
---|
28 | </form> |
---|
29 | <br> |
---|
30 | [% END %] |
---|
31 | [% END %] |
---|
32 | <form action="[% c.uri_for(voteid, 'ballot') %]" method="POST"> |
---|
33 | Ajouter un choix:<br> |
---|
34 | <input type="text" name="addch"> |
---|
35 | <input type="submit" value="Ajouter"> |
---|
36 | </form> |
---|
37 | </div> |
---|
38 | |
---|
39 | <div style="float: right; width: 30%" class="ballot"> |
---|
40 | <form action="[% c.uri_for(voteid, 'ballot') %]" method="POST"> |
---|
41 | <p>Prévisualisation du bulletin:</p> |
---|
42 | [% INCLUDE 'includes/ballot_form.tt' %] |
---|
43 | </form> |
---|
44 | </div> |
---|
45 | |
---|
46 | <div style="clear: both"></div> |
---|