Fixes membres ordering in MLs (Closes #1387).
[platal.git] / templates / xnetgrp / membres-edit.tpl
... / ...
CommitLineData
1{**************************************************************************}
2{* *}
3{* Copyright (C) 2003-2011 Polytechnique.org *}
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
23<script type="text/javascript">
24{literal}
25 function showInformations(box)
26 {
27 var state = (box.value != 'virtual') ? '' : 'none';
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}
41</script>
42
43<h1>{$asso->nom}&nbsp;: gestion des membres</h1>
44
45<p>
46[<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
47</p>
48
49<h2>
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>
52</h2>
53
54<form method="post" action="{$platal->ns}member/{$platal->argv[1]}">
55 {xsrf_token_field}
56 <table cellpadding="0" cellspacing="0" class='tinybicol'>
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}
68 <tr class="pair">
69 <td class="titre">
70 Permissions&nbsp;:
71 </td>
72 <td>
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>
76 </select>
77 </td>
78 </tr>
79 {if !$user->profile()}
80 <tr class="impair">
81 <td class="titre">
82 Type d'utilisateur&nbsp;:
83 </td>
84 <td>
85 <select name="type" onchange="showInformations(this); return true">
86 <option value="xnet" {if $user->type neq 'virtual'}selected="selected"{/if}>Personne physique</option>
87 <option value="virtual" {if $user->type eq "virtual"}selected="selected"{/if}>Personne morale</option>
88 </select>
89 </td>
90 </tr>
91 <tr id="prenom" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}>
92 <td class="titre">
93 Nom affiché&nbsp;:
94 </td>
95 <td>
96 <input type="text" value="{$user->displayName()}" name="display_name" size="40" />
97 </td>
98 </tr>
99 <tr class="impair">
100 <td class="titre">
101 Nom complet&nbsp;:
102 </td>
103 <td>
104 <input type="text" value="{$user->fullName()}" name="full_name" size="40" />
105 </td>
106 </tr>
107 <tr class="impair">
108 <td class="titre">
109 Nom annuaire&nbsp;:
110 </td>
111 <td>
112 <input type="text" value="{$user->directoryName()}" name="directory_name" size="40" />
113 </td>
114 </tr>
115 <tr id="sexe" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}>
116 <td class="titre">
117 Sexe&nbsp;:
118 </td>
119 <td>
120 <select name="sex">
121 <option value="male"{if !$user->isFemale()} selected="selected"{/if}>Homme</option>
122 <option value="female"{if $user->isFemale()} selected="selected"{/if}>Femme</option>
123 </select>
124 </td>
125 </tr>
126 {/if}
127 {if !$user->profile() || !$user->perms}
128 <tr class="impair">
129 <td class="titre">
130 Email&nbsp;:
131 </td>
132 <td>
133 <input type="text" value="{$user->forlifeEmail()}" name="email" size="40" />
134 </td>
135 </tr>
136 {/if}
137 <tr class="impair">
138 <td class="titre">
139 Commentaire&nbsp;:
140 </td>
141 <td>
142 <input type="text" name="comm" value="{$user->group_comm}" size="40" maxlength="255" /><br />
143 <small>Poste, origine&hellip; (accessible à toutes les personnes autorisées à consulter l'annuaire)</small>
144 </td>
145 </tr>
146 {if $user->type eq 'xnet'}
147 <tr id="make_X">
148 <td colspan="2">
149 <span id="make_X_cb">
150 <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
151 <label for="is_x">coche cette case s'il s'agit d'un X</label>
152 </span>
153 <span id="make_X_login" style="display: none">
154 <span class="titre">Identifiant (prenom.nom.promo)&nbsp;:</span>
155 <input type="text" name="login_X" value="" />
156 </span>
157 </td>
158 </tr>
159 {/if}
160 </table>
161
162 <h2>Abonnement aux listes</h2>
163
164 <table cellpadding="0" cellspacing="0" class='large'>
165 <tr>
166 <th>&nbsp;</th>
167 <th>Liste</th>
168 <th>Description</th>
169 <th>Nb</th>
170 </tr>
171 {foreach from=$listes item=liste}
172 <tr>
173 <td class='right'>
174 <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
175 <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
176 </td>
177 <td>
178 <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
179 </td>
180 <td>{$liste.desc|smarty:nodefaults}</td>
181 <td class='right'>{$liste.nbsub}</td>
182 </tr>
183 {foreachelse}
184 <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
185 {/foreach}
186 </table>
187
188 <h2>Abonnement aux alias</h2>
189
190 <table cellpadding="0" cellspacing="0" class='large'>
191 <tr>
192 <th>&nbsp;</th>
193 <th>Alias</th>
194 </tr>
195
196 {foreach from=$alias key=address item=sub}
197 <tr>
198 <td align='right'>
199 <input type='hidden' name='ml3[{$address}]' value='{$sub}' />
200 <input type='checkbox' name='ml4[{$address}]' {if $sub}checked="checked"{/if} />
201 </td>
202 <td>
203 <a href='{$platal->ns}alias/admin/{$address}'>{$address}</a>
204 </td>
205 </tr>
206 {foreachelse}
207 <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
208 {/foreach}
209 </table>
210
211 <div class="center">
212 <br />
213 <input type="submit" name='change' value="Valider ces changements" />
214 &nbsp;
215 <input type="reset" value="Annuler ces changements" />
216 </div>
217
218</form>
219
220
221{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}