Ignore:
Timestamp:
04/18/09 04:57:22 (15 years ago)
Author:
nanardon
Message:
  • make difference between settings and their raw value
  • simplify template
  • allow to have a different number of elected people than choice in ballot
Location:
trunk/root/templates/admin
Files:
2 edited

Legend:

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

    r207 r217  
    44[% poll = c.model('Vote').poll(voteid) %] 
    55 
    6 <div style="float: left; width: 35%" class="box"> 
    7 <form action="[% c.uri_for(voteid, 'ballot') %]"> 
    8 Nombre de choix possible: 
    9 <input type="text" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]"> 
    10 <br> 
    11 Nombre de choix libres: 
    12 <input type="text" name="free_choice" value="[% c.req.param('free_choice') || poll.info('free_choice') || 0 | html %]"> 
    13 <br> 
     6<div style="float: left; width: 55%" class="box"> 
     7<form action="[% c.uri_for(voteid, 'ballot') %]" method="POST"> 
     8<table border=1> 
     9<tr> 
     10<td>Nombre de choix possible:</td> 
     11<td><input type="text" size="3" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]"></td> 
     12</tr> 
     13 
     14<tr> 
     15<td>Nombre d'élu(s)<br>(si différent du nombre de choix)</td> 
     16<td><input type="text" size="3" name="elected_count" value="[% c.req.param('elected_count') || poll.raw_info('elected_count') | html %]"></td> 
     17</tr> 
     18 
     19<tr> 
     20<td>Nombre de choix libres:</td> 
     21<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</table> 
    1425<input type="submit" name="pollparam" value="Enregistrer"> 
    1526</form> 
  • trunk/root/templates/admin/includes/poll_settings.tt

    r206 r217  
    3636</form> 
    3737</div> 
     38 
     39<!-- Crypt settings --> 
    3840<div class="box" style="float:right; width: 35%"> 
    3941[% IF poll.is_crypted %] 
Note: See TracChangeset for help on using the changeset viewer.