source: branches/1/root/templates/ballot/default.tt @ 285

Last change on this file since 285 was 163, checked in by nanardon, 15 years ago
  • preserve line in ballot
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1[% vote = c.model('Vote') %]
2
3[% thisvote = vote.vote_info(voteid) %]
4
5<div id="ballot" class="ballot">
6<form action="[% c.uri_for(voteid) %]" method="POST">
7<p><b>Vote: [% thisvote.label | html %]</b></p>
8<p>[% thisvote.description | html | html_line_break %]</p>
9<p>[% thisvote.choice_count %] choix possibles:</p>
10<hr>
11[% IF c.req.param('ballot') %]
12<p>Confirmez votre vote:</p>
13[% FOREACH ch = c.req.param('sbal') %]
14[% choices.$ch | html %]
15<input type="hidden" name="sbal" value="[% ch %]">
16<br>
17[% END %]
18[% FOREACH ch = c.req.param('fsbal') %]
19[% ch | html %]<br>
20<input type="hidden" name="fsbal" value="[% ch %]">
21[% END %]
22[% IF ! c.req.param('fsbal').size && ! c.req.param('sbal').size %]
23<i>Vote blanc</i><br>
24[% END %]
25<hr>
26<p class="warning">AprÚs avoir valider, il vous sera impossible de modifier votre vote.</p>
27<p><input type="submit" name="confirm" value="Valider définitivement">
28<input type="submit" name="Modify" value="Modifier mon vote"></p>
29</form>
30
31[% ELSE %]
32
33[% IF vote_error %]<p class="alert">[% vote_error %]</p>[% END %]
34
35[% FOREACH choice = vote.vote_choices(voteid) %]
36[% key = vote.choice_info(choice).key %]
37<input type="checkbox" name="sbal" value="[% key %]"[% " checked" IF sbal.$key %]>
38[% vote.choice_info(choice).label | html %]<br>
39[% END %]
40
41[% count = 0 %]
42[% WHILE count < thisvote.free_choice %]
43<input type="text" name="fsbal" value="[% fsbal.$count %]"><br>
44[% count = count + 1 %]
45[% END %]
46<hr>
47<input type="submit" name="ballot" value="Voter &gt;&gt;">
48<p>Votre vote ne sera pris en compte qu'aprÚs confirmation</p>
49[% END %]
50</form>
51</div>
Note: See TracBrowser for help on using the repository browser.