Fix #735: Encoding of list description in member edition form.
[platal.git] / templates / xnetgrp / membres-edit.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 <script type="text/javascript">
24 {literal}
25   function showInformations(box)
26   {
27       var state = (box.value == 'ext') ? '' : 'none';
28       document.getElementById('prenom').style.display = state;
29       document.getElementById('sexe').style.display = state;
30       document.getElementById('make_X').style.display = state;
31   }
32
33   function showXInput(box)
34   {
35      if (box.checked) {
36        document.getElementById('make_X_cb').style.display = 'none';
37        document.getElementById('make_X_login').style.display = '';
38      }
39   }
40 {/literal}
41 </script>
42
43 <h1>{$asso.nom} : gestion des membres</h1>
44
45 <p>
46 [<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
47 </p>
48
49 <h2>
50   Édition du profil de {$user.prenom} {$user.nom}
51   {if $user.origine eq 'X'}
52   (X{$user.promo})
53   <a href="https://www.polytechnique.org/profile/{$user.alias}">{icon name=user_suit title="fiche"}</a>
54   {/if}
55   <a href="{$platal->ns}member/del/{$user.email}">{icon name=delete title="Suppression du compte"}</a>
56   <a href="mailto:{$user.email}">{icon name=email title="mail"}</a>
57 </h2>
58
59 <form method="post" action="{$platal->ns}member/{$platal->argv[1]}">
60   <table cellpadding="0" cellspacing="0" class='tinybicol'>
61     <tr class="pair">
62       <td class="titre">
63         Permissions:
64       </td>
65       <td>
66         <select name="is_admin">
67           <option value="0" {if !$user.perms}selected="selected"{/if}>Membre</option>
68           <option value="1" {if $user.perms}selected="selected"{/if}>Administrateur</option>
69         </select>
70       </td>
71     </tr>
72     {if $user.origine neq X}
73     <tr class="impair">
74       <td class="titre">
75         Type d'utilisateur :
76       </td>
77       <td>
78         <select name="origine" onchange="showInformations(this); return true">
79           <option value="ext" {if $user.origine eq "ext"}selected="selected"{/if}>Personne physique</option>
80           <option value="groupe" {if $user.origine eq "groupe"}selected="selected"{/if}>Personne morale</option>
81         </select>
82       </td>
83     </tr>
84     <tr id="prenom" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
85       <td class="titre">
86         Prénom :
87       </td>
88       <td>
89         <input type="text" value="{$user.prenom}" name="prenom" size="40" />
90       </td>
91     </tr>
92     <tr class="impair">
93       <td class="titre">
94         Nom :
95       </td>
96       <td>
97         <input type="text" value="{$user.nom}" name="nom" size="40" />
98       </td>
99     </tr>
100     <tr id="sexe" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
101       <td class="titre">
102         Sexe :
103       </td>
104       <td>
105         <select name="sexe">
106           <option value="0"{if $user.sexe eq 0} selected="selected"{/if}>Homme</option>
107           <option value="1"{if $user.sexe eq 1} selected="selected"{/if}>Femme</option>
108         </select>
109       </td>
110     </tr>
111     <tr class="impair">
112       <td class="titre">
113         Email:
114       </td>
115       <td>
116         <input type="text" value="{$user.email}" name="email" size="40" />
117       </td>
118     </tr>
119     <tr id="make_X" {if $user.origine eq "groupe"}style="display: none"{/if}>
120       <td colspan="2">
121         <span id="make_X_cb">
122           <input type="checkbox" name="is_x" id="is_x" onchange="showXInput(this);" />
123           <label for="is_x">coche cette case si il s'agit d'un X</label>
124         </span>
125         <span id="make_X_login" style="display: none">
126           <span class="titre">Identifiant (prenom.nom.promo)&nbsp;:</span>
127           <input type="text" name="login_X" value="" />
128         </span>
129       </td>
130     </tr>
131     {/if}
132   </table>
133
134   <h2>Abonnement aux listes</h2>
135
136   <table cellpadding="0" cellspacing="0" class='large'>
137     <tr>
138       <th>&nbsp;</th>
139       <th>Liste</th>
140       <th>Description</th>
141       <th>Nb</th>
142     </tr>
143     {foreach from=$listes item=liste}
144     <tr>
145       <td class='right'>
146         <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
147         <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
148       </td>
149       <td>
150         <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
151       </td>
152       <td>{$liste.desc|smarty:nodefaults}</td>
153       <td class='right'>{$liste.nbsub}</td>
154     </tr>
155     {foreachelse}
156     <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
157     {/foreach}
158   </table>
159
160   <h2>Abonnement aux alias</h2>
161
162   <table cellpadding="0" cellspacing="0" class='large'>
163     <tr>
164       <th>&nbsp;</th>
165       <th>Alias</th>
166     </tr>
167
168     {foreach from=$alias item=a}
169     <tr>
170       <td align='right'>
171         <input type='hidden' name='ml3[{$a.alias}]' value='{$a.sub}' />
172         <input type='checkbox' name='ml4[{$a.alias}]' {if $a.sub}checked="checked"{/if} />
173       </td>
174       <td>
175         <a href='{$platal->ns}alias/admin/{$a.alias}'>{$a.alias}</a>
176       </td>
177     </tr>
178     {foreachelse}
179     <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
180     {/foreach}
181   </table>
182
183   <div class="center">
184     <br />
185     <input type="submit" name='change' value="Valider ces changements" />
186     &nbsp;
187     <input type="reset" value="Annuler ces changements" />
188   </div>                                                                      
189
190 </form>
191
192
193 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}