source: trunk/root/templates/admin/default.tt @ 78

Last change on this file since 78 was 78, checked in by nanardon, 15 years ago
  • fix csv format, is now 'mail;nom'
  • Property svn:keywords set to Id
File size: 5.8 KB
Line 
1<DIV ID="testdiv1" STYLE="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"></DIV>
2
3[% vote = c.model('Vote') %]
4
5[% IF vote.vote_status(voteid) == 'BEFORE' %]
6<table border="1">
7<tr><th>Vote</th><th>Possibilité de vote</th></tr>
8<tr>
9<td valign="TOP">
10<form action="[% c.uri_for(voteid) %]" method="POST">
11
12[% thisvote = vote.vote_info(voteid) %]
13
14Label: <input type="text" name="label" value="[% c.req.param('label') || thisvote.label | html %]">
15<br>
16Description:<br>
17<textarea name="description" cols="60" rows="4">[% c.req.param('description') || thisvote.description | html %]</textarea>
18<br>
19<br>
20<!-- http://www.mattkruse.com/javascript/calendarpopup/ -->
21<i>Les dates sont au format JJ/MM/AAAA HH:MM:SS</i><br>
22
23<SCRIPT LANGUAGE="JavaScript" ID="js13">
24var cal13 = new CalendarPopup();
25</SCRIPT>
26
27Debut du vote:<br>
28Date: <input type="text" name="dstart" value="[% c.req.param('dstart') || thisvote.dstart | html %]">
29<A HREF="#" onClick="cal13.select(document.forms[0].dstart,'anchor13','dd/MM/yyyy'); return false;" TITLE="cal13.select(document.forms[0].dstart,'anchor13','dd/MM/yyyy'); return false;" NAME="anchor13" ID="anchor13">select</A>
30Heure: <input type="text" name="hstart" value="[% c.req.param('hstart') || thisvote.hstart | html %]">
31<br>
32Fin du vote:<br>
33Date: <input type="text" name="dend" value="[% c.req.param('dend') || thisvote.dend | html %]">
34<A HREF="#" onClick="cal13.select(document.forms[0].dend,'anchor14','dd/MM/yyyy',(document.forms[0].dend.value=='')?document.forms[0].dstart.value:null); return false;" TITLE="cal13.select(document.forms[0].dend,'anchor14','dd/MM/yyyy',(document.forms[0].dend.value=='')?document.forms[0].dstart.value:null); return false;" NAME="anchor14" ID="anchor14">select</A>
35Heure: <input type="text" name="hend" value="[% c.req.param('hend') || thisvote.hend | html %]">
36<br>
37<br>
38Nombre de choix possible:
39<input type="text" name="choice_count" value="[% c.req.param('choice_count') || thisvote.choice_count | html %]">
40<br>
41Nombre de choix libres:
42<input type="text" name="free_choice" value="[% c.req.param('free_choice') || thisvote.free_choice || 0 | html %]">
43<br>
44<input type="submit" value="Enregistrer">
45</form>
46</td>
47<td valign="TOP">
48[% IF ! vote.vote_choices(voteid).size %]
49<p class="alert">Aucun choix configuré</p>
50[% ELSE %]
51[% FOREACH choice = vote.vote_choices(voteid) %]
52<form action="[% c.uri_for(voteid) %]" method="POST">
53[% loop.count %] - [% vote.choice_info(choice).label | html %]
54<input type="hidden" name="delch" value="[% vote.choice_info(choice).key %]">
55<input type="submit" name="del" value="Effacer">
56</form>
57<br>
58[% END %]
59[% END %]
60<form action="[% c.uri_for(voteid) %]" method="POST">
61Ajouter un choix:<br>
62<input type="text" name="addch">
63<input type="submit" value="Ajouter">
64</form>
65</td>
66</tr>
67</table>
68[% ELSE %]
69[% INCLUDE 'includes/poll.tt' %]
70[% END %]
71<hr>
72
73[% IF vote.vote_status(voteid) != 'AFTER' %]
74Liste des votants :
75<table border="1">
76<tr>
77<td valign="TOP">
78<p>Ajouter un votant</p>
79<form action="[% c.uri_for(voteid) %]" method="POST">
80Nom: <input type="text" name="id"><br>
81Mail: <input type="text" name="mail"><br>
82<input type="submit" value="Ajouter">
83</form>
84<hr>
85<p>Soumettre la liste via un fichier csv (le Nom est optionnel)</p>
86<p>Format: <i>Mail@domain;Nom</i></p>
87<form method="POST" ENCTYPE="multipart/form-data" action="[% c.uri_for(voteid) %]">
88<input type="file" name="votinglist"><br>
89[% IF vote.vote_status(voteid) == 'BEFORE' %]
90<input type="checkbox" name="delete">Effacer la liste des votants<br>
91[% END %]
92<input type="submit" value="Ajouter">
93</form>
94<hr>
95<p>Envoyer les mots de passes au nouveaux votants</p>
96<form action="[% c.uri_for(voteid) %]" method="POST">
97<input type="submit" name="mailpasswd" value="Envoyer les mot de passe">
98</form>
99</td>
100<td valign="TOP">
101[% IF NOT vote.vote_voting_count(voteid) %]
102<p class="alert">Aucun votant inscrit</p>
103[% ELSE %]
104[% signing = vote.vote_voting(voteid) %]
105[% FOREACH thisvoting = signing %]
106[% voting = vote.voting_info(thisvoting) %]
107[% IF NOT voting.date %]
108<form action="[% c.uri_for(voteid) %]" method="POST">
109<input type="hidden" name="delvoting" value="[% voting.vkey %]">
110[% END %]
111[% voting.label | html %] [% voting.mail | html %]
112[% IF voting.passwd %]<i>(pass envoyé)</i>[% END %]
113[% IF NOT voting.date %]
114<input type="submit" name="delete" value="delete"><br>
115</form>
116[% ELSE %]
117(<i>a voté</i>)
118[% END %]
119[% END %]
120[% END %]
121</td>
122</tr>
123</table>
124
125[% ELSE %]
126
127[% INCLUDE 'includes/poll.tt' %]
128
129[% FOREACH untrusted = vote.vote_ballot_untrusted_values(voteid) %]
130[% IF loop.first %]
131<div id="map_ballot">
132<p>Remapper les valeurs des bulletins</p>
133<table border="1">
134<tr><th>Valeur saisie</th><th>Valeur à considérer</th></tr>
135[% END %]
136<tr>
137<td>[% untrusted | html %]</td>
138<td>
139    <form action="[% c.uri_for('/admin', voteid) %]" method="POST">
140    <input type="hidden" name="mapfrom" value="[% untrusted | html %]">
141    <select name="mapto">
142    [% FOREACH v = vote.vote_ballot_values(voteid) %]
143        [% NEXT IF v == untrusted %]
144        <option>[% v | html %]</options>
145    [% END %]
146    </select>
147    <input type="submit">
148    </form>
149</td>
150</tr>
151[% IF loop.last %]
152</table>
153</div>
154[% END %]
155[% END %]
156
157[% FOREACH bid = vote.list_vote_ballot_needvalid(voteid) %]
158    [% IF loop.first %]
159    <div id="ballot_to_valid">
160    <p>Bulletins à valider:</p>
161    <form action="[% c.uri_for(voteid) %]" method="POST">
162    <table border="1">
163    [% END %]
164<tr>
165<td>[% bid %]</td>
166<td>
167[% FOREACH item = vote.ballot_items(bid) %]
168[% loop.count %]- [% item.v %]<br>
169[% END %]
170</td>
171<td>
172<input type="radio" name="[% bid %]" value="valid">est valide<br>
173<input type="radio" name="[% bid %]" value="invalid">n'est pas valide<br>
174</td>
175</tr>
176    [% IF loop.last %]
177    </table>
178    <input type="submit">
179    </form>
180    </div>
181    [% END %]
182[% END %]
183[% END %]
Note: See TracBrowser for help on using the repository browser.