source: trunk/root/templates/admin/ballot.tt @ 207

Last change on this file since 207 was 207, checked in by nanardon, 15 years ago
  • cleanup old functions and switch everything to new objects
  • Property svn:keywords set to Id Rev
File size: 1.4 KB
Line 
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') %]">
8Nombre de choix possible:
9<input type="text" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]">
10<br>
11Nombre 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">
33Ajouter 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>
Note: See TracBrowser for help on using the repository browser.