Changeset 164


Ignore:
Timestamp:
04/06/09 01:00:41 (15 years ago)
Author:
nanardon
Message:
  • push ballot form into its own template to be reused
Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MANIFEST

    r160 r164  
    6565root/templates/ballot/signed.tt 
    6666root/templates/default.tt 
     67root/templates/includes/ballot_form.tt 
    6768root/templates/includes/footer.tt 
    6869root/templates/includes/header.tt 
  • trunk/root/templates/ballot/default.tt

    r114 r164  
    66<form action="[% c.uri_for(voteid) %]" method="POST"> 
    77<p><b>Vote: [% thisvote.label | html %]</b></p> 
    8 <p>[% thisvote.description | html %]</p> 
     8<p>[% thisvote.description | html | html_line_break %]</p> 
    99<p>[% thisvote.choice_count %] choix possibles:</p> 
    1010<hr> 
    1111[% IF c.req.param('ballot') %] 
    1212<p>Confirmez votre vote:</p> 
     13 
    1314[% FOREACH ch = c.req.param('sbal') %] 
    1415[% choices.$ch | html %] 
     
    2324<i>Vote blanc</i><br> 
    2425[% END %] 
     26 
    2527<hr> 
    2628<p class="warning">AprÚs avoir valider, il vous sera impossible de modifier votre vote.</p> 
     
    3335[% IF vote_error %]<p class="alert">[% vote_error %]</p>[% END %] 
    3436 
    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 %] 
     37[% INCLUDE 'includes/ballot_form.tt' %] 
    4038 
    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 %] 
    4639<hr> 
    4740<input type="submit" name="ballot" value="Voter &gt;&gt;"> 
Note: See TracChangeset for help on using the changeset viewer.