Fix entry in list/members when the user has no name in X.net directory.
[platal.git] / templates / xnetgrp / membres-edit.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 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 {
27 var state = (box.value == 'ext') ? '' : '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}
06db561e 41</script>
42
e8439508 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>
a7de4ef7 50 Édition du profil de {$user.prenom} {$user.nom}
0337d704 51 {if $user.origine eq 'X'}
52 (X{$user.promo})
7ac1ef77 53 <a href="https://www.polytechnique.org/profile/{$user.alias}">{icon name=user_suit title="fiche"}</a>
0337d704 54 {/if}
a72a67b9 55 <a href="{$platal->ns}member/del/{$user.email}">{icon name=delete title="Suppression du compte"}</a>
f7413044 56 <a href="mailto:{$user.email}">{icon name=email title="mail"}</a>
0337d704 57</h2>
58
7b2413f6 59<form method="post" action="{$platal->ns}member/{$platal->argv[1]}">
0cc4c07d 60 <table cellpadding="0" cellspacing="0" class='tinybicol'>
61 <tr class="pair">
0337d704 62 <td class="titre">
54b24ba2 63 Permissions&nbsp;:
0337d704 64 </td>
65 <td>
66 <select name="is_admin">
67 <option value="0" {if !$user.perms}selected="selected"{/if}>Membre</option>
6ba9f404 68 <option value="1" {if $user.perms}selected="selected"{/if}>Animateur</option>
0337d704 69 </select>
70 </td>
71 </tr>
72 {if $user.origine neq X}
0cc4c07d 73 <tr class="impair">
0337d704 74 <td class="titre">
e8439508 75 Type d'utilisateur&nbsp;:
06db561e 76 </td>
77 <td>
78 <select name="origine" onchange="showInformations(this); return true">
79 <option value="ext" {if $user.origine eq "ext"}selected="selected"{/if}>Personne physique</option>
80 <option value="groupe" {if $user.origine eq "groupe"}selected="selected"{/if}>Personne morale</option>
81 </select>
82 </td>
83 </tr>
84 <tr id="prenom" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
85 <td class="titre">
e8439508 86 Prénom&nbsp;:
0337d704 87 </td>
88 <td>
89 <input type="text" value="{$user.prenom}" name="prenom" size="40" />
90 </td>
91 </tr>
0cc4c07d 92 <tr class="impair">
0337d704 93 <td class="titre">
e8439508 94 Nom&nbsp;:
0337d704 95 </td>
96 <td>
97 <input type="text" value="{$user.nom}" name="nom" size="40" />
98 </td>
99 </tr>
06db561e 100 <tr id="sexe" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
0cc4c07d 101 <td class="titre">
e8439508 102 Sexe&nbsp;:
0cc4c07d 103 </td>
104 <td>
105 <select name="sexe">
106 <option value="0"{if $user.sexe eq 0} selected="selected"{/if}>Homme</option>
107 <option value="1"{if $user.sexe eq 1} selected="selected"{/if}>Femme</option>
108 </select>
109 </td>
110 </tr>
111 <tr class="impair">
0337d704 112 <td class="titre">
54b24ba2 113 Email&nbsp;:
0337d704 114 </td>
115 <td>
116 <input type="text" value="{$user.email}" name="email" size="40" />
117 </td>
118 </tr>
54b24ba2
FB
119 {/if}
120 <tr class="impair">
121 <td class="titre">
122 Commentaire&nbsp;:
123 </td>
124 <td>
125 <input type="text" name="comm" value="{$user.comm}" size="40" maxlength="255" /><br />
126 <small>Poste, origine, ... (accessible à toutes les personnes autorisées à consulter l'annuaire)</small>
127 </td>
128 </tr>
129 {if $user.origine neq X}
631565e1
FB
130 <tr id="make_X" {if $user.origine eq "groupe"}style="display: none"{/if}>
131 <td colspan="2">
132 <span id="make_X_cb">
52e34cc0 133 <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
631565e1
FB
134 <label for="is_x">coche cette case si il s'agit d'un X</label>
135 </span>
136 <span id="make_X_login" style="display: none">
137 <span class="titre">Identifiant (prenom.nom.promo)&nbsp;:</span>
138 <input type="text" name="login_X" value="" />
139 </span>
140 </td>
141 </tr>
0337d704 142 {/if}
143 </table>
144
145 <h2>Abonnement aux listes</h2>
146
147 <table cellpadding="0" cellspacing="0" class='large'>
148 <tr>
149 <th>&nbsp;</th>
150 <th>Liste</th>
151 <th>Description</th>
152 <th>Nb</th>
153 </tr>
154 {foreach from=$listes item=liste}
155 <tr>
156 <td class='right'>
157 <input type='hidden' name='ml1[{$liste.list}]' value='{$liste.sub}' />
158 <input type='checkbox' name='ml2[{$liste.list}]' {if $liste.sub eq 2}checked="checked"{/if} />
159 </td>
160 <td>
7b2413f6 161 <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
0337d704 162 </td>
4b88dabd 163 <td>{$liste.desc|smarty:nodefaults}</td>
0337d704 164 <td class='right'>{$liste.nbsub}</td>
165 </tr>
166 {foreachelse}
167 <tr><td colspan='4'>Pas de listes pour ce groupe</td></tr>
168 {/foreach}
169 </table>
170
171 <h2>Abonnement aux alias</h2>
172
173 <table cellpadding="0" cellspacing="0" class='large'>
174 <tr>
175 <th>&nbsp;</th>
176 <th>Alias</th>
177 </tr>
178
179 {foreach from=$alias item=a}
180 <tr>
181 <td align='right'>
182 <input type='hidden' name='ml3[{$a.alias}]' value='{$a.sub}' />
183 <input type='checkbox' name='ml4[{$a.alias}]' {if $a.sub}checked="checked"{/if} />
184 </td>
185 <td>
7b2413f6 186 <a href='{$platal->ns}alias/admin/{$a.alias}'>{$a.alias}</a>
0337d704 187 </td>
188 </tr>
189 {foreachelse}
190 <tr><td colspan='2'>Pas d'alias pour ce groupe</td></tr>
191 {/foreach}
192 </table>
193
194 <div class="center">
195 <br />
196 <input type="submit" name='change' value="Valider ces changements" />
197 &nbsp;
198 <input type="reset" value="Annuler ces changements" />
199 </div>
200
201</form>
202
203
a7de4ef7 204{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}