Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git] / templates / xnetgrp / membres-edit.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
5e1513f6 3{* Copyright (C) 2003-2011 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}&nbsp;: 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'>
ee4556f0
FB
58 {if hasPerm('admin')}
59 <tr class="pair">
60 <td class="titre">
61 Identifiant unique&nbsp;:
62 </td>
63 <td>
64 {$user->hruid}
65 <a href="https://www.polytechnique.org/admin/user/{$user->hruid}">{icon name="user_edit" title="Administer"}</a>
66 </td>
67 </tr>
68 {/if}
0cc4c07d 69 <tr class="pair">
0337d704 70 <td class="titre">
54b24ba2 71 Permissions&nbsp;:
0337d704 72 </td>
73 <td>
bb88d138
PC
74 <select name="group_perms">
75 <option value="membre" {if $user->group_perms eq 'membre'}selected="selected"{/if}>Membre</option>
76 <option value="admin" {if $user->group_perms eq 'admin'}selected="selected"{/if}>Animateur</option>
0337d704 77 </select>
78 </td>
79 </tr>
33fcb12c
SJ
80 <tr class="pair">
81 <td class="titre">
82 Poste&nbsp;:
83 </td>
84 <td>
85 <select name="group_position">
86 <option value=""{if $user->group_position eq ''} selected="selected"{/if}></option>
87 {foreach from=$positions item=position}
88 <option value="{$position}"{if $user->group_position eq $position} selected="selected"{/if}>{$position}</option>
89 {/foreach}
90 </select>
91 </td>
92 </tr>
1d6870e1 93 {if $user->type eq 'virtual' || ($user->type eq 'xnet' && !$user->perms)}
0cc4c07d 94 <tr class="impair">
0337d704 95 <td class="titre">
e8439508 96 Type d'utilisateur&nbsp;:
06db561e 97 </td>
98 <td>
33a4f3f9 99 <select name="type" onchange="showInformations(this); return true">
bb88d138
PC
100 <option value="xnet" {if $user->type neq 'virtual'}selected="selected"{/if}>Personne physique</option>
101 <option value="virtual" {if $user->type eq "virtual"}selected="selected"{/if}>Personne morale</option>
06db561e 102 </select>
103 </td>
104 </tr>
b7753795
SJ
105 <tr class="impair">
106 <td class="titre">Nom complet&nbsp;:</td>
107 <td>{$user->fullName()}</td>
108 </tr>
109 <tr class="impair">
110 <td class="titre">Nom annuaire&nbsp;:</td>
111 <td>{$user->directoryName()}</td>
112 </tr>
113 <tr class="impair">
114 <td class="titre">Nom&nbsp;:</td>
0337d704 115 <td>
b7753795 116 <input type="text" value="{$user->lastname}" name="lastname" size="40" />
0337d704 117 </td>
118 </tr>
b7753795 119 {if $user->type neq "virtual"}
0cc4c07d 120 <tr class="impair">
b7753795 121 <td class="titre">Prénom&nbsp;:</td>
0337d704 122 <td>
b7753795 123 <input type="text" value="{$user->firstname}" name="firstname" size="40" />
0337d704 124 </td>
125 </tr>
d081acb2 126 <tr class="impair">
b7753795 127 <td class="titre">Nom affiché&nbsp;:</td>
d081acb2 128 <td>
b7753795 129 <input type="text" value="{$user->displayName()}" name="display_name" size="40" />
d081acb2
SJ
130 </td>
131 </tr>
b7753795 132 {/if}
a6761ca9 133 <tr id="sexe" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}>
0cc4c07d 134 <td class="titre">
e8439508 135 Sexe&nbsp;:
0cc4c07d 136 </td>
137 <td>
33a4f3f9 138 <select name="sex">
bb88d138
PC
139 <option value="male"{if !$user->isFemale()} selected="selected"{/if}>Homme</option>
140 <option value="female"{if $user->isFemale()} selected="selected"{/if}>Femme</option>
0cc4c07d 141 </select>
142 </td>
143 </tr>
b42417f4 144 {if !$user->perms}
0cc4c07d 145 <tr class="impair">
0337d704 146 <td class="titre">
54b24ba2 147 Email&nbsp;:
0337d704 148 </td>
149 <td>
33a4f3f9 150 <input type="text" value="{$user->forlifeEmail()}" name="email" size="40" />
0337d704 151 </td>
152 </tr>
bb88d138 153 {/if}
b42417f4 154 {/if}
54b24ba2
FB
155 <tr class="impair">
156 <td class="titre">
157 Commentaire&nbsp;:
158 </td>
159 <td>
a6761ca9 160 <input type="text" name="comm" value="{$user->group_comm}" size="40" maxlength="255" /><br />
6e828e47 161 <small>Poste, origine&hellip; (accessible à toutes les personnes autorisées à consulter l'annuaire)</small>
54b24ba2
FB
162 </td>
163 </tr>
bb88d138 164 {if $user->type eq 'xnet'}
a6761ca9 165 <tr id="make_X">
631565e1
FB
166 <td colspan="2">
167 <span id="make_X_cb">
52e34cc0 168 <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
841ff7e7 169 <label for="is_x">coche cette case s'il s'agit d'un X</label>
631565e1
FB
170 </span>
171 <span id="make_X_login" style="display: none">
172 <span class="titre">Identifiant (prenom.nom.promo)&nbsp;:</span>
173 <input type="text" name="login_X" value="" />
174 </span>
175 </td>
176 </tr>
0337d704 177 {/if}
fb422cab
SJ
178 {if $user->type eq 'xnet' && $suggest}
179 <tr>
180 <td colspan="2">
181 <label>
182 <input type="checkbox" name="suggest" />
183 coche cette case si tu souhaites qu'un compte « Extérieur » soit créé
184 pour cette personne et que nous lui envoyions un email afin qu'il ait
185 accès aux nombreuses fonctionnalités de Polytechnique.net (inscription
186 aux évènements, télépaiement, modération des listes de diffusion&hellip;)
187 </label>
188 </td>
189 </tr>
190 {/if}
0337d704 191 </table>
192
193 <h2>Abonnement aux listes</h2>
194
195 <table cellpadding="0" cellspacing="0" class='large'>
196 <tr>
197 <th>&nbsp;</th>
198 <th>Liste</th>
199 <th>Description</th>
200 <th>Nb</th>
201 </tr>
202 {foreach from=$listes item=liste}
203 <tr>
204 <td class='right'>
205 <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
206 <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
207 </td>
208 <td>
7b2413f6 209 <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
0337d704 210 </td>
4b88dabd 211 <td>{$liste.desc|smarty:nodefaults}</td>
0337d704 212 <td class='right'>{$liste.nbsub}</td>
213 </tr>
214 {foreachelse}
215 <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
216 {/foreach}
217 </table>
218
219 <h2>Abonnement aux alias</h2>
220
221 <table cellpadding="0" cellspacing="0" class='large'>
222 <tr>
223 <th>&nbsp;</th>
224 <th>Alias</th>
225 </tr>
226
a6761ca9 227 {foreach from=$alias key=address item=sub}
0337d704 228 <tr>
229 <td align='right'>
a6761ca9
FB
230 <input type='hidden' name='ml3[{$address}]' value='{$sub}' />
231 <input type='checkbox' name='ml4[{$address}]' {if $sub}checked="checked"{/if} />
0337d704 232 </td>
233 <td>
a6761ca9 234 <a href='{$platal->ns}alias/admin/{$address}'>{$address}</a>
0337d704 235 </td>
236 </tr>
237 {foreachelse}
238 <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
239 {/foreach}
240 </table>
241
242 <div class="center">
243 <br />
30439e34 244 <input type="submit" name='change' value="Valider ces changements" onclick="return hashResponse('new_plain_password', false, false, false);" />
0337d704 245 &nbsp;
246 <input type="reset" value="Annuler ces changements" />
d64a57f4 247 </div>
0337d704 248
249</form>
250
251
a7de4ef7 252{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}