Photo preview in profile/edit is nicer (dummy test for dev.m4x.org
[platal.git] / templates / profile / general.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23
24 {include file="profile/applis.js.tpl"}
25   <table class="bicol" style="margin-bottom: 1em"
26     summary="Profil : Informations générales">
27     <tr>
28       <th colspan="2">
29         Informations générales
30       </th>
31     </tr>
32     <tr>
33       <td colspan="2" class="flags">
34         <span class="vert">
35           <input type="checkbox" disabled="disabled" checked="checked" />
36         </span>
37         <span class="texte">
38           site public
39         </span>
40       </td>
41     </tr>
42     <tr>
43       <td class="colg">
44         <span class="titre">Nom</span>
45         <span class="comm"></span>
46       </td>
47       <td class="cold">
48         <input type='text' name='nom' {if $errors.nom}class="error"{/if} value="{$nom}" />
49       </td>
50     </tr>
51     <tr>
52       <td class="colg">
53         <span class="titre">Prénom</span>
54         <span class="comm"></span>
55       </td>
56       <td class="cold">
57         <input type='text' name='prenom' {if $errors.prenom}class="error"{/if} value="{$prenom}" />
58       </td>
59     </tr>
60     <tr>
61       <td class="colg">
62         <span class="titre">Promotion</span>
63       </td>
64       <td class="cold">
65         <span class="nom">X{$promo}{if ($promo != $promo_sortie - 3)} - X{math equation="a - b" a=$promo_sortie b=3}{/if}</span>
66         <span class="lien"><a href="profile/orange">modifier</a>{if ($promo_sortie -3 == $promo)} pour les oranges{/if}</span>
67       </td>
68     </tr>
69     <tr>
70       <td class="colg">
71         <span class="titre">Nom d'usage</span><br />
72         {if $smarty.session.sexe}
73         <span class="comm">(Notamment nom d'épouse)</span>
74         {else}
75         <span class="comm">(si différent de {$nom} seulement)</span>
76         {/if}
77       </td>
78       <td class="cold">
79         <span class="nom">{$nom_usage|default:"Aucun"}</span>
80         <span class="lien"><a href="profile/usage">modifier</a></span>
81       </td>
82     </tr>
83     <tr>
84       <td class="colg">
85         <span class="titre">Nationalité</span>
86       </td>
87       <td class="cold">
88         <select name="nationalite">
89           {select_nat valeur=$nationalite}
90         </select>
91       </td>
92     </tr>
93     <tr>
94       <td class="colg">
95         <span class="titre">Application</span><br />
96         <span class="comm">(4ème année de l'X)</span>
97       </td>
98       <td class="cold">
99         <select name="appli1[id]" onchange="fillType(this.form['appli1[type]'], this.selectedIndex-1);">
100           {applis_options selected=$appli1.id}
101         </select>
102         <br />
103         <select name="appli1[type]">
104           <option value=""></option>
105         </select>
106         <script type="text/javascript">
107           <!--
108           fillType(document.forms.prof_annu['appli1[type]'], document.forms.prof_annu['appli1[id]'].selectedIndex-1);
109           selectType(document.forms.prof_annu['appli1[type]'], '{$appli1.type}');
110           //-->
111         </script>
112       </td>
113     </tr>
114     <tr>
115       <td class="dcolg">
116         <span class="titre">Post-application</span>
117       </td>
118       <td class="dcold">
119         <select name="appli2[id]" onchange="fillType(this.form['appli2[type]'], this.selectedIndex-1);">
120           {applis_options selected=$appli2.id}
121         </select>
122         <br />
123         <select name="appli2[type]">
124           <option value=""></option>
125         </select>
126         <script type="text/javascript">
127           <!--
128           fillType(document.forms.prof_annu['appli2[type]'], document.forms.prof_annu['appli2[id]'].selectedIndex-1);
129           selectType(document.forms.prof_annu['appli2[type]'], '{$appli2.type}');
130           //-->
131         </script>
132       </td>
133     </tr>
134   </table>
135
136 {if !$no_private_key}
137   <table class="bicol"  style="margin-bottom: 1em"
138     summary="Profil : Informations générales">
139     <tr>
140       <th>
141         Synchronisation avec l'AX
142       </th>
143     </tr>
144     <tr>
145       <td>
146         <p>
147           Le service annuaire de l'<a href='http://www.polytechniciens.com'>AX</a> met à jour l'annuaire papier à partir des informations que tu lui fournis. Tu peux choisir ici d'envoyer directement les données de ta fiche Polytechnique.org vers ta <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$matricule_ax}">fiche AX</a>.
148         </p>
149         <p>
150           L'opération de synchronisation prend en compte toutes les informations que tu as marquées comme transmises à l'AX (en orange ou en vert). Elle peut alors effacer, modifier ou rajouter des informations sur ta <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$matricule_ax}">fiche AX</a> selon ce qui s'y trouve déjà.
151         </p>
152         <p class="center">
153           <a href="profile/edit/general?synchro_ax=confirm" onclick="return confirm('Es-tu sûr de vouloir lancer la synchronisation ?')"><input type="button" value="Synchroniser"/></a>
154         </p>
155       </td>
156     </tr>
157     <tr>
158       <td class="col">
159         <table class="flags" cellspacing="0" summary="Flags">
160           <tr>
161             <td class="orange">
162               <input type="checkbox" name="synchro_ax" {if $synchro_ax}checked="checked" {/if}/>
163             </td>
164             <td class="texte">
165               Autoriser la synchronisation vers l'AX par des administrateurs ou des scripts automatiques.
166             </td>
167           </tr>
168         </table>
169       </td>
170     </tr>
171   </table>
172 {/if}
173
174   <table class="bicol"  style="margin-bottom: 1em"
175     summary="Profil: Trombinoscope">
176     <tr>
177       <th colspan="2">
178         Trombinoscope
179       </th>
180     </tr>
181     <tr>
182       <td class="flags" colspan="2">
183         <span class="vert"><input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/></span>
184         <span class="texte">site public</span>
185       </td>
186     </tr>
187     <tr>
188       <td {if !$nouvellephoto}colspan="2"{/if} class="center" style="width: 49%">
189         <div class="titre">Ta photo actuelle</div>
190         <img src="photo/{$smarty.session.forlife}" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
191       </td>
192       {if $nouvellephoto}
193       <td class="center" style="width: 49%">
194         <div class="titre">Photo en attente de validation</div>
195         <div>
196           <a href="profile/{$smarty.session.forlife}?modif=new" class="popup2">
197             Ta fiche avec cette photo
198           </a>
199         </div>
200         <img src="photo/{$smarty.session.forlife}/req" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
201       </td>
202       {/if}
203     </tr>
204     <tr>
205       <td colspan="2">
206         Pour profiter de cette fonction intéressante, tu dois disposer
207         quelque part (sur ton ordinateur ou sur Internet) d'une photo
208         d'identité (dans un fichier au format JPEG, PNG ou GIF).<br />
209         <div class="center">
210           <a href="photo/change">Éditer ta photo</a>
211         </div>
212       </td>
213     </tr>
214   </table>
215   <table class="bicol" style="margin-bottom: 1em"
216     summary="Profil: Divers">
217     <tr>
218       <th colspan="2">
219         Divers
220       </th>
221     </tr>
222     <tr>
223       <td colspan="2" class="pflags">
224         <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
225           <tr>
226             <td class="rouge">
227               <input type="checkbox" disabled="disabled" checked="checked" />
228             </td>
229             <td class="texte">
230               privé
231             </td>
232           </tr>
233         </table>
234       </td>
235     </tr>
236     <tr>
237       <td class="colg">
238         <span class="titre">Surnom</span>
239       </td>
240       <td class="cold">
241         <input type="text" size="35" maxlength="64"
242                {if $errors.nick}class="error"{/if} name="nick" value="{$nick}" />
243       </td>
244     </tr>
245     <tr>
246       <td colspan="2" class="pflags">
247         <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
248           <tr>
249             <td class="vert">
250               <input type="radio" name="mobile_pub" {if $mobile_pub eq 'public'}checked="checked"{/if} value='public' />
251             </td>
252             <td class="texte">
253               site public
254             </td>
255             <td class="orange">
256               <input type="radio" name="mobile_pub" {if $mobile_pub eq 'ax'}checked="checked"{/if} value='ax' />
257             </td>
258             <td class="texte">
259               transmis à l'AX
260             </td>
261             <td class="rouge">
262               <input type="radio" name="mobile_pub" {if $mobile_pub eq 'private'}checked="checked"{/if} value='private' />
263             </td>
264             <td class="texte">
265               privé
266             </td>
267             <td class="texte">
268               <a href="Xorg/FAQ?display=light#flags" class="popup_800x240">Quelle couleur ??</a>
269             </td>
270           </tr>
271         </table>
272       </td>
273     </tr>
274     <tr>
275       <td class="colg">
276         <span class="titre">Téléphone mobile</span>
277       </td>
278       <td class="cold">
279         <input type="text" size="18" maxlength="18" name="mobile"
280                {if $errors.mobile}class="error"{/if} value="{$mobile}" />
281       </td>
282     </tr>
283     <tr>
284       <td colspan="2" class="flags">
285         <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
286           <tr>
287             <td class="vert">
288               <input type="checkbox" name="web_pub" {if $web_pub eq 'public'}checked="checked"{/if} />
289             </td>
290             <td class="texte">
291               site public
292             </td>
293             <td class="texte">
294               <a href="Xorg/FAQ?display=light#flags" class="popup_800x240">Quelle couleur ??</a>
295             </td>
296           </tr>
297         </table>
298       </td>
299     </tr>
300     <tr>
301       <td class="dcolg">
302         <span class="titre">Page web Perso</span>
303       </td>
304       <td class="dcold">
305         <input type="text" size="35" maxlength="95" name="web"
306                {if $errors.web}class="error"{/if} value="{$web}" />
307       </td>
308     </tr>
309     <tr>
310       <td colspan="2" class="pflags">
311         <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
312           <tr>
313             <td class="vert">
314               <input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
315             </td>
316             <td class="texte">
317               site public
318             </td>
319             <td class="texte">
320               <a href="Xorg/FAQ?display=light#flags" class="popup_800x240">Quelle couleur ??</a>
321             </td>
322           </tr>
323         </table>
324       </td>
325     </tr>
326     <tr>
327       <td class="dcolg">
328         <div>
329           <span class="titre">Complément libre</span>
330           <span class="comm">Commentaire ? ICQ ? etc...</span>
331         </div>
332         <div class="smaller" style="margin-top: 30px">
333           <a href="wiki_help/notitle" class="popup3">
334             {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour le commentaire
335           </a>
336           <div class="center">
337             <input type="submit" name="preview" value="Aperçu"
338                     onclick="previewWiki('freetext', 'ft_preview', true, 'ft_preview'); return false;" />
339           </div>
340         </div>
341       </td>
342       <td class="dcold">
343         <div id="ft_preview" style="display: none"></div>
344         <textarea name="freetext" {if $errors.freetext}class="error"{/if}
345                   id="freetext" rows="8" cols="35" >{$freetext}</textarea>
346       </td>
347     </tr>
348   </table>
349
350 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}