source: trunk/root/templates/ballot/default.tt @ 45

Last change on this file since 45 was 45, checked in by nanardon, 15 years ago
  • make vote more clear
File size: 1.4 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 %]</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<input type="submit" name="confirm" value="Valider définitevement">
27<input type="submit" name="Modify" value="Modifier mon vote">
28</form>
29
30[% ELSE %]
31
32[% IF vote_error %]<p class="alert">[% vote_error %]</p>[% END %]
33
34[% FOREACH choice = vote.vote_choices(voteid) %]
35[% key = vote.choice_info(choice).key %]
36<input type="checkbox" name="sbal" value="[% key %]"[% " checked" IF sbal.$key %]>
37[% vote.choice_info(choice).label | html %]<br>
38[% END %]
39
40[% count = 0 %]
41[% WHILE count < thisvote.free_choice %]
42<input type="text" name="fsbal" value="[% fsbal.$count %]"><br>
43[% count = count + 1 %]
44[% END %]
45<hr>
46<input type="submit" name="ballot" value="Voter &gt;&gt;">
47<p>Votre vote ne sera pris en compte qu'aprÚs confirmation</p>
48[% END %]
49</form>
50</div>
Note: See TracBrowser for help on using the repository browser.