[16] | 1 | [% vote = c.model('Vote') %] |
---|
| 2 | |
---|
[29] | 3 | [% IF vote.vote_status(voteid) == 'BEFORE' %] |
---|
[22] | 4 | <table border="1"> |
---|
| 5 | <tr><th>Vote</th><th>Possibilité de vote</th></tr> |
---|
| 6 | <tr> |
---|
| 7 | <td valign="TOP"> |
---|
[16] | 8 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 9 | |
---|
| 10 | [% thisvote = vote.vote_info(voteid) %] |
---|
| 11 | |
---|
| 12 | Label: <input type="text" name="label" value="[% c.req.param('label') || thisvote.label | html %]"> |
---|
| 13 | <br> |
---|
| 14 | Description: <textarea name="description">[% c.req.param('description') || thisvote.description | html %]</textarea> |
---|
| 15 | <br> |
---|
| 16 | Debut du vote: |
---|
| 17 | <input type="text" name="start" value="[% c.req.param('start') || thisvote.start | html %]"> |
---|
[22] | 18 | <br> |
---|
[16] | 19 | Fin du vote: |
---|
| 20 | <input type="text" name="end" value="[% c.req.param('end') || thisvote.end | html %]"> |
---|
| 21 | <br> |
---|
| 22 | Nombre de choix possible: |
---|
| 23 | <input type="text" name="choice_count" value="[% c.req.param('choice_count') || thisvote.choice_count | html %]"> |
---|
| 24 | <br> |
---|
| 25 | Nombre de choix libres: |
---|
| 26 | <input type="text" name="free_choice" value="[% c.req.param('free_choice') || thisvote.free_choice | html %]"> |
---|
| 27 | <br> |
---|
[22] | 28 | <input type="submit"> |
---|
| 29 | </form> |
---|
| 30 | </td> |
---|
| 31 | <td valign="TOP"> |
---|
| 32 | [% FOREACH choice = vote.vote_choices(voteid) %] |
---|
| 33 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 34 | [% loop.count %] - [% vote.choice_info(choice).label | html %] |
---|
| 35 | <input type="hidden" name="delch" value="[% vote.choice_info(choice).key %]"> |
---|
| 36 | <input type="submit" name="del" value="Effacer"> |
---|
| 37 | </form> |
---|
| 38 | <br> |
---|
| 39 | [% END %] |
---|
| 40 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 41 | Ajouter un choix:<br> |
---|
| 42 | <input type="text" name="addch"> |
---|
| 43 | <input type="submit"> |
---|
| 44 | </form> |
---|
| 45 | </td> |
---|
| 46 | </tr> |
---|
| 47 | </table> |
---|
[16] | 48 | |
---|
[22] | 49 | <hr> |
---|
[16] | 50 | |
---|
[22] | 51 | <table border="1"> |
---|
| 52 | <tr> |
---|
| 53 | <td valign="TOP"> |
---|
[23] | 54 | [% signing = vote.vote_voting(voteid) %] |
---|
| 55 | [% FOREACH thisvoting = signing %] |
---|
| 56 | [% voting = vote.voting_info(thisvoting) %] |
---|
| 57 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 58 | <input type="hidden" name="delvoting" value="[% voting.vkey %]"> |
---|
[34] | 59 | [% voting.label | html %] [% voting.mail | html %] |
---|
[28] | 60 | [% IF voting.passwd %]<i>(pass envoyé)</i>[% END %] |
---|
[23] | 61 | <input type="submit" name="delete" value="delete"><br> |
---|
| 62 | </form> |
---|
[22] | 63 | [% END %] |
---|
| 64 | </td> |
---|
| 65 | <td valign="TOP"> |
---|
| 66 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 67 | Login: <input type="text" name="id"><br> |
---|
| 68 | Mail: <input type="text" name="mail"><br> |
---|
[16] | 69 | <input type="submit"> |
---|
| 70 | </form> |
---|
[22] | 71 | <hr> |
---|
| 72 | <form method="POST" ENCTYPE="multipart/form-data" action="[% c.uri_for(voteid) %]"> |
---|
| 73 | <input type="file" name="votinglist"><br> |
---|
| 74 | <input type="checkbox" name="delete">Effacer la liste des votants<br> |
---|
| 75 | <input type="submit"> |
---|
| 76 | </form> |
---|
[28] | 77 | <hr> |
---|
| 78 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 79 | <input type="submit" name="mailpasswd" value="Envoyer les mot de passe"> |
---|
| 80 | </form> |
---|
[22] | 81 | </td> |
---|
| 82 | </tr> |
---|
| 83 | </table> |
---|
[29] | 84 | |
---|
| 85 | [% ELSE %] |
---|
| 86 | |
---|
| 87 | [% FOREACH bid = vote.list_vote_ballot_needvalid(voteid) %] |
---|
| 88 | [% IF loop.first %] |
---|
| 89 | <form action="[% c.uri_for(voteid) %]"> |
---|
| 90 | <table border="1"> |
---|
| 91 | [% END %] |
---|
| 92 | <tr> |
---|
| 93 | <td>[% bid %]</td> |
---|
| 94 | <td> |
---|
| 95 | [% FOREACH item = [ vote.ballot_items(bid) ] %] |
---|
| 96 | [% item.v %]<br> |
---|
| 97 | [% END %] |
---|
| 98 | </td> |
---|
| 99 | <td> |
---|
| 100 | <input type="radio" name="[% bid %]" value="valid">est valide<br> |
---|
| 101 | <input type="radio" name="[% bid %]" value="invalid">n'est pas valide<br> |
---|
| 102 | </td> |
---|
| 103 | </tr> |
---|
| 104 | [% IF loop.last %] |
---|
| 105 | </table> |
---|
| 106 | <input type="submit"> |
---|
| 107 | </form> |
---|
| 108 | [% END %] |
---|
| 109 | [% END %] |
---|
| 110 | [% END %] |
---|