Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
9f5bd98e | 3 | {* Copyright (C) 2003-2010 Polytechnique.org *} |
0337d704 | 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 | ||
06db561e | 23 | <script type="text/javascript"> |
631565e1 FB |
24 | {literal} |
25 | function showInformations(box) | |
26 | { | |
bb88d138 | 27 | var state = (box.value != 'virtual') ? '' : 'none'; |
631565e1 FB |
28 | document.getElementById('prenom').style.display = state; |
29 | document.getElementById('sexe').style.display = state; | |
30 | document.getElementById('make_X').style.display = state; | |
d64a57f4 | 31 | document.getElementById('password').style.display = state; |
631565e1 FB |
32 | } |
33 | ||
34 | function showXInput(box) | |
35 | { | |
36 | if (box.checked) { | |
37 | document.getElementById('make_X_cb').style.display = 'none'; | |
38 | document.getElementById('make_X_login').style.display = ''; | |
39 | } | |
40 | } | |
41 | {/literal} | |
06db561e | 42 | </script> |
43 | ||
34ade5a6 | 44 | <h1>{$asso->nom} : gestion des membres</h1> |
0337d704 | 45 | |
ef7c8560 | 46 | <p> |
a7de4ef7 | 47 | [<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>] |
ef7c8560 | 48 | </p> |
49 | ||
0337d704 | 50 | <h2> |
a6761ca9 FB |
51 | Édition du profil de {profile user=$user groupperms=false sex=false promo=true} |
52 | <a href="mailto:{$user->bestEmail()}">{icon name=email title="mail"}</a> | |
0337d704 | 53 | </h2> |
54 | ||
7b2413f6 | 55 | <form method="post" action="{$platal->ns}member/{$platal->argv[1]}"> |
e7fdf9dd | 56 | {xsrf_token_field} |
0cc4c07d | 57 | <table cellpadding="0" cellspacing="0" class='tinybicol'> |
58 | <tr class="pair"> | |
0337d704 | 59 | <td class="titre"> |
54b24ba2 | 60 | Permissions : |
0337d704 | 61 | </td> |
62 | <td> | |
bb88d138 PC |
63 | <select name="group_perms"> |
64 | <option value="membre" {if $user->group_perms eq 'membre'}selected="selected"{/if}>Membre</option> | |
65 | <option value="admin" {if $user->group_perms eq 'admin'}selected="selected"{/if}>Animateur</option> | |
0337d704 | 66 | </select> |
67 | </td> | |
68 | </tr> | |
bb88d138 | 69 | {if !$user->profile()} |
0cc4c07d | 70 | <tr class="impair"> |
0337d704 | 71 | <td class="titre"> |
e8439508 | 72 | Type d'utilisateur : |
06db561e | 73 | </td> |
74 | <td> | |
33a4f3f9 | 75 | <select name="type" onchange="showInformations(this); return true"> |
bb88d138 PC |
76 | <option value="xnet" {if $user->type neq 'virtual'}selected="selected"{/if}>Personne physique</option> |
77 | <option value="virtual" {if $user->type eq "virtual"}selected="selected"{/if}>Personne morale</option> | |
06db561e | 78 | </select> |
79 | </td> | |
80 | </tr> | |
a6761ca9 | 81 | <tr id="prenom" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}> |
06db561e | 82 | <td class="titre"> |
bb88d138 | 83 | Nom affiché : |
0337d704 | 84 | </td> |
85 | <td> | |
33a4f3f9 | 86 | <input type="text" value="{$user->displayName()}" name="display_name" size="40" /> |
0337d704 | 87 | </td> |
88 | </tr> | |
0cc4c07d | 89 | <tr class="impair"> |
0337d704 | 90 | <td class="titre"> |
bb88d138 | 91 | Nom complet : |
0337d704 | 92 | </td> |
93 | <td> | |
33a4f3f9 | 94 | <input type="text" value="{$user->fullName()}" name="full_name" size="40" /> |
0337d704 | 95 | </td> |
96 | </tr> | |
d081acb2 SJ |
97 | <tr class="impair"> |
98 | <td class="titre"> | |
99 | Nom annuaire : | |
100 | </td> | |
101 | <td> | |
33a4f3f9 | 102 | <input type="text" value="{$user->directoryName()}" name="directory_name" size="40" /> |
d081acb2 SJ |
103 | </td> |
104 | </tr> | |
a6761ca9 | 105 | <tr id="sexe" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}> |
0cc4c07d | 106 | <td class="titre"> |
e8439508 | 107 | Sexe : |
0cc4c07d | 108 | </td> |
109 | <td> | |
33a4f3f9 | 110 | <select name="sex"> |
bb88d138 PC |
111 | <option value="male"{if !$user->isFemale()} selected="selected"{/if}>Homme</option> |
112 | <option value="female"{if $user->isFemale()} selected="selected"{/if}>Femme</option> | |
0cc4c07d | 113 | </select> |
114 | </td> | |
115 | </tr> | |
33a4f3f9 SJ |
116 | {/if} |
117 | {if !$user->profile() || !$user->perms} | |
0cc4c07d | 118 | <tr class="impair"> |
0337d704 | 119 | <td class="titre"> |
54b24ba2 | 120 | Email : |
0337d704 | 121 | </td> |
122 | <td> | |
33a4f3f9 | 123 | <input type="text" value="{$user->forlifeEmail()}" name="email" size="40" /> |
0337d704 | 124 | </td> |
125 | </tr> | |
bb88d138 | 126 | {/if} |
54b24ba2 FB |
127 | <tr class="impair"> |
128 | <td class="titre"> | |
129 | Commentaire : | |
130 | </td> | |
131 | <td> | |
a6761ca9 | 132 | <input type="text" name="comm" value="{$user->group_comm}" size="40" maxlength="255" /><br /> |
6e828e47 | 133 | <small>Poste, origine… (accessible à toutes les personnes autorisées à consulter l'annuaire)</small> |
54b24ba2 FB |
134 | </td> |
135 | </tr> | |
bb88d138 | 136 | {if $user->type eq 'xnet'} |
d64a57f4 SJ |
137 | <tr class="impair" id="password"> |
138 | <td class="titre">Mot de passe :</td> | |
139 | <td> | |
140 | <div style="float: left"> | |
141 | <input type="text" name="new_plain_password" size="10" maxlength="256" value="********" /> | |
142 | <input type="hidden" name="pwhash" value="" /> | |
143 | </div> | |
144 | <div style="float: left; margin-top: 5px;"> | |
145 | {checkpasswd prompt="new_plain_password" submit="dummy_none"} | |
146 | </div> | |
147 | </td> | |
148 | </tr> | |
a6761ca9 | 149 | <tr id="make_X"> |
631565e1 FB |
150 | <td colspan="2"> |
151 | <span id="make_X_cb"> | |
52e34cc0 | 152 | <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" /> |
841ff7e7 | 153 | <label for="is_x">coche cette case s'il s'agit d'un X</label> |
631565e1 FB |
154 | </span> |
155 | <span id="make_X_login" style="display: none"> | |
156 | <span class="titre">Identifiant (prenom.nom.promo) :</span> | |
157 | <input type="text" name="login_X" value="" /> | |
158 | </span> | |
159 | </td> | |
160 | </tr> | |
0337d704 | 161 | {/if} |
162 | </table> | |
163 | ||
164 | <h2>Abonnement aux listes</h2> | |
165 | ||
166 | <table cellpadding="0" cellspacing="0" class='large'> | |
167 | <tr> | |
168 | <th> </th> | |
169 | <th>Liste</th> | |
170 | <th>Description</th> | |
171 | <th>Nb</th> | |
172 | </tr> | |
173 | {foreach from=$listes item=liste} | |
174 | <tr> | |
175 | <td class='right'> | |
176 | <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' /> | |
177 | <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} /> | |
178 | </td> | |
179 | <td> | |
7b2413f6 | 180 | <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a> |
0337d704 | 181 | </td> |
4b88dabd | 182 | <td>{$liste.desc|smarty:nodefaults}</td> |
0337d704 | 183 | <td class='right'>{$liste.nbsub}</td> |
184 | </tr> | |
185 | {foreachelse} | |
186 | <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr> | |
187 | {/foreach} | |
188 | </table> | |
189 | ||
190 | <h2>Abonnement aux alias</h2> | |
191 | ||
192 | <table cellpadding="0" cellspacing="0" class='large'> | |
193 | <tr> | |
194 | <th> </th> | |
195 | <th>Alias</th> | |
196 | </tr> | |
197 | ||
a6761ca9 | 198 | {foreach from=$alias key=address item=sub} |
0337d704 | 199 | <tr> |
200 | <td align='right'> | |
a6761ca9 FB |
201 | <input type='hidden' name='ml3[{$address}]' value='{$sub}' /> |
202 | <input type='checkbox' name='ml4[{$address}]' {if $sub}checked="checked"{/if} /> | |
0337d704 | 203 | </td> |
204 | <td> | |
a6761ca9 | 205 | <a href='{$platal->ns}alias/admin/{$address}'>{$address}</a> |
0337d704 | 206 | </td> |
207 | </tr> | |
208 | {foreachelse} | |
209 | <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr> | |
210 | {/foreach} | |
211 | </table> | |
212 | ||
213 | <div class="center"> | |
214 | <br /> | |
d64a57f4 | 215 | <input type="submit" name='change' value="Valider ces changements" onclick="return hashResponse('new_plain_password', false, false);" /> |
0337d704 | 216 | |
217 | <input type="reset" value="Annuler ces changements" /> | |
d64a57f4 | 218 | </div> |
0337d704 | 219 | |
220 | </form> | |
221 | ||
222 | ||
a7de4ef7 | 223 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |