1 | [% vote = c.model('Vote') %] |
---|
2 | |
---|
3 | [% IF vote.vote_status(voteid) == 'BEFORE' %] |
---|
4 | <table border="1"> |
---|
5 | <tr><th>Vote</th><th>Possibilité de vote</th></tr> |
---|
6 | <tr> |
---|
7 | <td valign="TOP"> |
---|
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 %]"> |
---|
18 | <br> |
---|
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> |
---|
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> |
---|
48 | |
---|
49 | <hr> |
---|
50 | |
---|
51 | <table border="1"> |
---|
52 | <tr> |
---|
53 | <td valign="TOP"> |
---|
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 %]"> |
---|
59 | [% voting.label | html %] [% voting.mail | html %] |
---|
60 | [% IF voting.passwd %]<i>(pass envoyé)</i>[% END %] |
---|
61 | <input type="submit" name="delete" value="delete"><br> |
---|
62 | </form> |
---|
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> |
---|
69 | <input type="submit"> |
---|
70 | </form> |
---|
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> |
---|
77 | <hr> |
---|
78 | <form action="[% c.uri_for(voteid) %]"> |
---|
79 | <input type="submit" name="mailpasswd" value="Envoyer les mot de passe"> |
---|
80 | </form> |
---|
81 | </td> |
---|
82 | </tr> |
---|
83 | </table> |
---|
84 | |
---|
85 | [% ELSE %] |
---|
86 | |
---|
87 | [% FOREACH bid = vote.list_vote_ballot_needvalid(voteid) %] |
---|
88 | [% IF loop.first %] |
---|
89 | <div id="ballot_to_valid"> |
---|
90 | <p>Bulletins à valider</p> |
---|
91 | <form action="[% c.uri_for(voteid) %]"> |
---|
92 | <table border="1"> |
---|
93 | [% END %] |
---|
94 | <tr> |
---|
95 | <td>[% bid %]</td> |
---|
96 | <td> |
---|
97 | [% FOREACH item = vote.ballot_items(bid) %] |
---|
98 | [% loop.count %]- [% item.v %]<br> |
---|
99 | [% END %] |
---|
100 | </td> |
---|
101 | <td> |
---|
102 | <input type="radio" name="[% bid %]" value="valid">est valide<br> |
---|
103 | <input type="radio" name="[% bid %]" value="invalid">n'est pas valide<br> |
---|
104 | </td> |
---|
105 | </tr> |
---|
106 | [% IF loop.last %] |
---|
107 | </table> |
---|
108 | <input type="submit"> |
---|
109 | </form> |
---|
110 | </div> |
---|
111 | [% END %] |
---|
112 | [% END %] |
---|
113 | [% END %] |
---|