Changeset 221 for trunk/root/templates


Ignore:
Timestamp:
04/20/09 03:24:26 (15 years ago)
Author:
nanardon
Message:
  • add a select build from voting list on ballot
Location:
trunk/root/templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/templates/admin/ballot.tt

    r217 r221  
    2020<td>Nombre de choix libres:</td> 
    2121<td><input type="text" size="3" name="free_choice" value="[% c.req.param('free_choice') || poll.info('free_choice') || 0 | html %]"></td> 
     22</tr> 
     23 
     24<tr> 
     25<td>Nombre de choix à partir de la liste des électeurs:</td> 
     26<td><input type="text" size="3" name="elected_choice" value="[% c.req.param('elected_choice') || poll.info('elected_choice') || 0 | html %]"></td> 
    2227</tr> 
    2328 
  • trunk/root/templates/ballot/default.tt

    r206 r221  
    2424<input type="hidden" name="fsbal" value="[% ch %]"> 
    2525[% END %] 
    26 [% IF ! c.req.param('fsbal').size && ! c.req.param('sbal').size %] 
     26[% FOREACH ch = c.req.param('esbal') %] 
     27[% ch | html %]<br> 
     28<input type="hidden" name="esbal" value="[% ch %]"> 
     29[% END %] 
     30[% IF ! c.req.param('fsbal').size && ! c.req.param('sbal').size && ! c.req.param('esbal').size %] 
    2731<i>Vote blanc</i><br> 
    2832[% END %] 
  • trunk/root/templates/includes/ballot_form.tt

    r219 r221  
    33<!-- $Id$ --> 
    44[% FOREACH key = poll.choices() %] 
     5[% "<p>Candidats:</p>" IF loop.first %] 
    56[% choice = poll.choice(key) %] 
    67<input type="checkbox" name="sbal" value="[% key %]"[% " checked" IF sbal.$key %]> 
     
    1011[% count = 0 %] 
    1112[% WHILE count < (poll.info('elected_choice') || 0) %] 
     13[% "<p>Depuis la liste électorale</p>" IF count == 0 %] 
    1214[% FOREACH vkey = poll.voting_keys %] 
    1315[% voting = poll.voting(vkey) %] 
    1416[% '<select name="esbal"><option value=""></option>' IF loop.first %] 
    15 <option value="[% voting.info.id || voting.info.mail | html %]"> 
    16     [% voting.info.id || voting.info.mail | html %] 
     17<option value="[% voting.info.label || voting.info.mail | html %]" 
     18    [% " selected" IF esbal.$count == (voting.info.label || voting.info.mail) %]> 
     19    [% voting.info.label || voting.info.mail | html %] 
    1720</option> 
    1821[% '</select>' IF loop.last %] 
Note: See TracChangeset for help on using the changeset viewer.