Happy New Year!
[platal.git] / templates / xnetgrp / membres-edit.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
c441aabe 3{* Copyright (C) 2003-2014 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;
d64a57f4 30 document.getElementById('password').style.display = state;
631565e1 31 }
631565e1 32{/literal}
06db561e 33</script>
34
34ade5a6 35<h1>{$asso->nom}&nbsp;: gestion des membres</h1>
0337d704 36
ef7c8560 37<p>
a7de4ef7 38[<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
ef7c8560 39</p>
40
0337d704 41<h2>
a6761ca9 42 Édition du profil de {profile user=$user groupperms=false sex=false promo=true}
54d7f43b 43 {if $user->bestEmail()}
a6761ca9 44 <a href="mailto:{$user->bestEmail()}">{icon name=email title="mail"}</a>
54d7f43b 45 {/if}
0337d704 46</h2>
47
3db328a4
SJ
48{if $user->type eq 'x' || $user->type eq 'master' || $user->type eq 'phd'}
49{if $user->state eq 'pending'}
50<p>
51 {"Ce"|sex:"Cette":$user} camarade n'est pas {"inscrit"|sex:"inscrite":$user}.
52 <a href="{$globals->xnet->xorg_baseurl}marketing/public/{$user->login()}" class='popup'>Si tu connais son adresse email,
53 <strong>n'hésite pas à nous la transmettre !</strong>
54 </a>
55</p>
56{elseif $user->state neq 'disabled' && $user->lost}
57<p>
58 {"Ce"|sex:"Cette":$user} camarade n'a plus d'adresse de redirection valide.
59 <a href="{$globals->xnet->xorg_baseurl}marketing/broken/{$user->login()}">
60 Si tu en connais une, <strong>n'hésite pas à nous la transmettre</strong>.
61 </a>
62</p>
63{/if}
64{/if}
65
7b2413f6 66<form method="post" action="{$platal->ns}member/{$platal->argv[1]}">
e7fdf9dd 67 {xsrf_token_field}
0cc4c07d 68 <table cellpadding="0" cellspacing="0" class='tinybicol'>
ee4556f0
FB
69 {if hasPerm('admin')}
70 <tr class="pair">
71 <td class="titre">
72 Identifiant unique&nbsp;:
73 </td>
74 <td>
75 {$user->hruid}
76 <a href="https://www.polytechnique.org/admin/user/{$user->hruid}">{icon name="user_edit" title="Administer"}</a>
77 </td>
78 </tr>
79 {/if}
0cc4c07d 80 <tr class="pair">
0337d704 81 <td class="titre">
54b24ba2 82 Permissions&nbsp;:
0337d704 83 </td>
84 <td>
bb88d138
PC
85 <select name="group_perms">
86 <option value="membre" {if $user->group_perms eq 'membre'}selected="selected"{/if}>Membre</option>
87 <option value="admin" {if $user->group_perms eq 'admin'}selected="selected"{/if}>Animateur</option>
0337d704 88 </select>
89 </td>
90 </tr>
33fcb12c
SJ
91 <tr class="pair">
92 <td class="titre">
93 Poste&nbsp;:
94 </td>
95 <td>
96 <select name="group_position">
97 <option value=""{if $user->group_position eq ''} selected="selected"{/if}></option>
98 {foreach from=$positions item=position}
99 <option value="{$position}"{if $user->group_position eq $position} selected="selected"{/if}>{$position}</option>
100 {/foreach}
101 </select>
102 </td>
103 </tr>
1d6870e1 104 {if $user->type eq 'virtual' || ($user->type eq 'xnet' && !$user->perms)}
0cc4c07d 105 <tr class="impair">
0337d704 106 <td class="titre">
e8439508 107 Type d'utilisateur&nbsp;:
06db561e 108 </td>
109 <td>
33a4f3f9 110 <select name="type" onchange="showInformations(this); return true">
bb88d138
PC
111 <option value="xnet" {if $user->type neq 'virtual'}selected="selected"{/if}>Personne physique</option>
112 <option value="virtual" {if $user->type eq "virtual"}selected="selected"{/if}>Personne morale</option>
06db561e 113 </select>
114 </td>
115 </tr>
b7753795
SJ
116 <tr class="impair">
117 <td class="titre">Nom complet&nbsp;:</td>
118 <td>{$user->fullName()}</td>
119 </tr>
120 <tr class="impair">
121 <td class="titre">Nom annuaire&nbsp;:</td>
122 <td>{$user->directoryName()}</td>
123 </tr>
124 <tr class="impair">
125 <td class="titre">Nom&nbsp;:</td>
0337d704 126 <td>
b7753795 127 <input type="text" value="{$user->lastname}" name="lastname" size="40" />
0337d704 128 </td>
129 </tr>
b7753795 130 {if $user->type neq "virtual"}
0cc4c07d 131 <tr class="impair">
b7753795 132 <td class="titre">Prénom&nbsp;:</td>
0337d704 133 <td>
b7753795 134 <input type="text" value="{$user->firstname}" name="firstname" size="40" />
0337d704 135 </td>
136 </tr>
d081acb2 137 <tr class="impair">
b7753795 138 <td class="titre">Nom affiché&nbsp;:</td>
d081acb2 139 <td>
b7753795 140 <input type="text" value="{$user->displayName()}" name="display_name" size="40" />
d081acb2
SJ
141 </td>
142 </tr>
b7753795 143 {/if}
a6761ca9 144 <tr id="sexe" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}>
0cc4c07d 145 <td class="titre">
e8439508 146 Sexe&nbsp;:
0cc4c07d 147 </td>
148 <td>
33a4f3f9 149 <select name="sex">
bb88d138
PC
150 <option value="male"{if !$user->isFemale()} selected="selected"{/if}>Homme</option>
151 <option value="female"{if $user->isFemale()} selected="selected"{/if}>Femme</option>
0cc4c07d 152 </select>
153 </td>
154 </tr>
b42417f4 155 {if !$user->perms}
0cc4c07d 156 <tr class="impair">
0337d704 157 <td class="titre">
54b24ba2 158 Email&nbsp;:
0337d704 159 </td>
160 <td>
33a4f3f9 161 <input type="text" value="{$user->forlifeEmail()}" name="email" size="40" />
0337d704 162 </td>
163 </tr>
bb88d138 164 {/if}
b42417f4 165 {/if}
54b24ba2
FB
166 <tr class="impair">
167 <td class="titre">
168 Commentaire&nbsp;:
169 </td>
170 <td>
a6761ca9 171 <input type="text" name="comm" value="{$user->group_comm}" size="40" maxlength="255" /><br />
6e828e47 172 <small>Poste, origine&hellip; (accessible à toutes les personnes autorisées à consulter l'annuaire)</small>
54b24ba2
FB
173 </td>
174 </tr>
bf26b317
SJ
175 {if $asso->has_nl}
176 <tr class="impair">
177 <td class="titre">
178 Newsletter&nbsp;:
179 </td>
180 <td>
181 <label>Inscrit<input type="radio" name="newsletter" value="1" {if $nl_registered eq 1}checked="checked"{/if} /></label>
182 &nbsp;-&nbsp;
183 <label><input type="radio" name="newsletter" value="0" {if $nl_registered eq 0}checked="checked"{/if} />Non inscrit</label>
184 </td>
185 </tr>
186 {/if}
bb88d138 187 {if $user->type eq 'xnet'}
8773c4c2 188 {include file="xnetgrp/members_new_form.tpl" registered=true}
0337d704 189 {/if}
fb422cab
SJ
190 {if $user->type eq 'xnet' && $suggest}
191 <tr>
192 <td colspan="2">
193 <label>
194 <input type="checkbox" name="suggest" />
d49b4a9a 195 coche cette case si tu souhaites qu'un compte «&nbsp;Extérieur&nbsp;» soit créé
fb422cab
SJ
196 pour cette personne et que nous lui envoyions un email afin qu'il ait
197 accès aux nombreuses fonctionnalités de Polytechnique.net (inscription
198 aux évènements, télépaiement, modération des listes de diffusion&hellip;)
199 </label>
200 </td>
201 </tr>
202 {/if}
d49b4a9a
SJ
203 {if $user->type eq 'xnet' && $pending_xnet_account}
204 <tr>
205 <td colspan="2">
206 <label>
207 <input type="checkbox" name="again" />
208 Cette personne a un compte «&nbsp;Extérieur&nbsp;» en attente d'activation de sa part. Pour la relancer, il suffit
209 de cocher la case ci-contre.
210 </label>
211 </td>
212 </tr>
213 {/if}
0337d704 214 </table>
215
54d7f43b 216 {if $user->bestEmail()}
0337d704 217 <h2>Abonnement aux listes</h2>
218
219 <table cellpadding="0" cellspacing="0" class='large'>
220 <tr>
221 <th>&nbsp;</th>
222 <th>Liste</th>
223 <th>Description</th>
224 <th>Nb</th>
225 </tr>
226 {foreach from=$listes item=liste}
227 <tr>
228 <td class='right'>
229 <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
230 <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
231 </td>
232 <td>
7b2413f6 233 <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
0337d704 234 </td>
4b88dabd 235 <td>{$liste.desc|smarty:nodefaults}</td>
0337d704 236 <td class='right'>{$liste.nbsub}</td>
237 </tr>
238 {foreachelse}
239 <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
240 {/foreach}
241 </table>
242
243 <h2>Abonnement aux alias</h2>
244
245 <table cellpadding="0" cellspacing="0" class='large'>
246 <tr>
247 <th>&nbsp;</th>
248 <th>Alias</th>
249 </tr>
250
a6761ca9 251 {foreach from=$alias key=address item=sub}
0337d704 252 <tr>
253 <td align='right'>
a6761ca9
FB
254 <input type='hidden' name='ml3[{$address}]' value='{$sub}' />
255 <input type='checkbox' name='ml4[{$address}]' {if $sub}checked="checked"{/if} />
0337d704 256 </td>
257 <td>
a6761ca9 258 <a href='{$platal->ns}alias/admin/{$address}'>{$address}</a>
0337d704 259 </td>
260 </tr>
261 {foreachelse}
262 <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
263 {/foreach}
264 </table>
54d7f43b
SJ
265 {else}
266 <p>Cette personne n'a pas d'email renseigné sur le site et ne peut donc pas être inscrite aux listes de diffusions et aux alias du groupe.</p>
267 {/if}
0337d704 268
269 <div class="center">
270 <br />
30439e34 271 <input type="submit" name='change' value="Valider ces changements" onclick="return hashResponse('new_plain_password', false, false, false);" />
0337d704 272 &nbsp;
273 <input type="reset" value="Annuler ces changements" />
d64a57f4 274 </div>
0337d704 275
276</form>
277
278
a7de4ef7 279{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}