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