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