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