1 {**************************************************************************}
3 {* Copyright (C) 2003-2010 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
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. *}
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. *}
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 *}
21 {**************************************************************************}
24 {if t($smarty.post.delete_account)}
25 <form method="post" action="admin/user/{$user->login()}">
28 <legend>Confirmer la suppression de l'utilisateur {$user->hruid}</legend>
30 {if $user->hasProfile()}
32 <input type="checkbox" name="clear_profile" /> Vider la fiche de
37 <input type="checkbox" name="erase_account" {if $user->state eq 'pending'}checked="checked"{/if} /> Supprimer le compte définitivement.
41 <input type="hidden" name="uid" value="{$user->uid}" />
42 <input type="submit" name="account_deletion_cancel" value="Annuler" />
43 <input type="submit" name="account_deletion_confirmation" value="Confirmer" />
47 {elseif t($smarty.post.erase_account)}
49 <a href="admin/accounts">Retourner à la gestion des comptes</a>
54 <script type="text/javascript">
56 function del_alias(alias) {
57 document.forms.alias.del_alias.value = alias;
58 document.forms.alias.submit();
61 function del_profile(pid) {
62 document.forms.profiles.del_profile.value = pid;
63 document.forms.profiles.submit();
66 function del_fwd(fwd) {
67 document.forms.fwds.del_fwd.value = fwd;
68 document.forms.fwds.submit();
71 function del_openid(id) {
72 document.forms.openid.del_openid.value = id;
73 document.forms.openid.submit();
76 function act_fwd(fwd, activate) {
78 document.forms.fwds.activate_fwd.value = fwd;
80 document.forms.fwds.deactivate_fwd.value = fwd;
81 document.forms.fwds.submit();
83 function clean_fwd(fwd) {
84 document.forms.fwds.clean_fwd.value = fwd;
85 document.forms.fwds.submit();
89 document.forms.bans.write_perm.value = "!xorg.*";
93 document.forms.bans.read_perm.value = "!xorg.*";
96 $(document).ready(function() {
97 $('#tabs > ul').tabs();
98 $('.ui-tabs-nav li').width('24%')
99 .click(function() { $(this).children('a').click() });
107 <ul style="margin-top: 0">
108 <li><a href="{$platal->pl_self()}#account"><span >Compte de {$user->login()}</span></a></li>
109 <li><a href="{$platal->pl_self()}#emails"><span>Emails</span></a></li>
110 <li><a href="{$platal->pl_self()}#authext"><span>OpenID</span></a></li>
111 <li><a href="{$platal->pl_self()}#forums"><span>Forums</span></a></li>
116 <form id="auth" method="post" action="admin/user/{$user->login()}#account">
118 <h1>Informations sur le compte</h1>
120 Dernière connexion le <strong>{$lastlogin|date_format:"%d %B %Y, %T"}</strong>
121 depuis <strong>{$host}</strong>.
124 <table class="bicol">
127 <div style="float: right; text-align: right">
128 {if $user->state eq 'pending'}
131 Inscrit le {$user->registration_date|date_format}
134 <div style="float: left; text-align: left">
135 {icon name=user_gray} {$user->hruid} (uid {$user->id()})
137 <input type="hidden" name="uid" value="{$user->id()}" />
141 <td class="titre">Nom complet<br />
142 <span class="smaller">Prénom NOM</span>
144 <td>{if $hasProfile}{$user->fullName()}{else}<input type="text" name="full_name" maxlength="255" value="{$user->fullName()}" />{/if}</td>
147 <td class="titre">Nom annuaire<br />
148 <span class="smaller">NOM Prénom</span>
150 <td>{if $hasProfile}{$user->directoryName()}{else}<input type="text" name="directory_name" maxlength="255" value="{$user->directoryName()}" />{/if}</td>
153 <td class="titre">Nom affiché</td>
154 <td>{if $hasProfile}{$user->displayName()}{else}<input type="text" name="display_name" maxlength="255" value="{$user->displayName()}" />{/if}</td>
157 <td class="titre">Sexe</td>
159 <label>femme <input type="radio" name="sex" value="female" {if $user->isFemale()}checked="checked"{/if} /></label>
160 <label><input type="radio" name="sex" value="male" {if !$user->isFemale()}checked="checked"{/if} /> homme</label>
164 <td class="titre">Email</td>
165 <td>{if $user->checkPerms('mail')}{$user->forlifeEmail()}{else}<input type="text" name="email" size="40" maxlength="255" value="{$user->forlifeEmail()}" />{/if}</td>
168 <td class="titre">Mot de passe</td>
170 <div style="float: left">
171 <input type="text" name="new_plain_password" size="10" maxlength="256" value="********" />
172 <input type="hidden" name="pwhash" value="" />
174 <div style="float: left; margin-top: 5px;">
175 {checkpasswd prompt="new_plain_password" submit="dummy_none"}
180 <td class="titre">Mot de passe SMTP</td>
182 <div style="float: left">
183 <input type="password" name="weak_password" size="10" maxlength="256" value="" />
184 {if $user->weak_access}
185 <input type="submit" name="disable_weak_access" value="Supprimer" />
191 <td class="titre">Accès RSS</td>
194 <input type="checkbox" name="token_access" {if $user->token_access}checked="checked"{/if} value="1" />
200 <td class="titre">Skin</td>
203 <option value="" {if !$user->skin}selected="selected"{/if}>Aucune (défaut du système)</option>
204 {iterate from=$skins item=skin}
205 <option value="{$skin.id}" {if $user->skin eq $skin.id}selected="selected"{/if}>{$skin.name}</option>
211 <td class="titre">Etat du compte</td>
213 <select name="state">
214 <option value="pending" {if $user->state eq 'pending'}selected="selected"{/if}>pending (Non-inscrit)</option>
215 <option value="active" {if $user->state eq 'active'}selected="selected"{/if}>active (Inscrit, peut se logguer)</option>
216 <option value="disabled" {if $user->state eq 'disabled'}selected="selected"{/if}>disabled (Inscrit, accès interdit)</option>
219 <input type="checkbox" name="is_admin" value="1" {if $user->is_admin}checked="checked"{/if} />
220 administrateur du site
225 <td class="titre">Type de compte</td>
228 {iterate from=$account_types item=type}
229 <option value="{$type.type}" {if $user->type eq $type.type}selected="selected"{/if}>{$type.type} ({$type.perms})</option>
232 <a href="admin/account/types">{icon name=wrench title=Gérer} gérer</a>
240 <label><input type="checkbox" name="watch" {if $user->watch}checked="checked"{/if} value="1" />
241 Surveiller l'activité de ce compte</label><br />
242 <span class="smaller">Cette option permet d'avoir des logs complets de l'activité
243 du compte via le logger, et d'être alerté lors des connexions de l'utilisateur.</span>
251 <input type="text" name="comment" size="40" maxlength="64" value="{$user->comment}" />
255 <td colspan="2" class="center">
256 <input type="submit" name="update_account" value="Mettre à jour" onclick="return hashResponse('new_plain_password', false, false);" />
257 <input type="submit" name="su_account" value="Prendre l'identité" />
258 <input type="submit" name="log_account" value="Consulter les logs" />
259 {if $user->state neq 'pending'}
260 <input type="submit" name="delete_account" value="Désinscrire" />
261 {elseif !$user->hasProfile()}
262 <input type="submit" name="delete_account" value="Supprimer le compte" />
269 <h1>Fiches associées au compte</h1>
271 <form id="profiles" method="post" action="admin/user/{$user->login()}#account">
273 <table class="bicol">
276 <th>Identifiant de la fiche</th>
279 {iterate from=$profiles item=profile}
281 <td><input type="radio" name="owner" value="{$profile.pid}" {if $profile.owner}checked="checked"{/if}
282 onclick="this.form.submit()" /></td>
283 <td>{$profile.hrpid} (pid {$profile.pid})</td>
285 <a href="profile/edit/{$profile.hrpid}">{icon name=user_edit}</a>
286 <a href="profile/{$profile.hrpid}" class="popup2">{icon name=user_suit}</a>
287 <a href="javascript:del_profile({$profile.pid})">{icon name=cross}</a>
291 {if $profiles->total() > 0}
294 <input type="radio" name="owner" value="0" onclick="this.form.submit()" />
302 <input type="hidden" name="del_profile" value="" />
303 <input type="text" maxlength="64" name="new_profile" />
304 <input type="submit" name="add_profile" value="Ajouter" />
310 <h1>Groupes dont l'utilisateur est membre</h1>
312 <table class="bicol">
314 <th>Nom du groupe</th>
317 {foreach from=$user->groups() item=group}
319 <td>{$group.nom}</td>
320 <td style="text-align: right">
322 <a href="http://www.polytechnique.net/{$group.diminutif}/member/{$user->hruid}">
323 {icon name="user_edit" title="Modifier l'inscription"}
333 <h1>Gestion de l'adresse X.org</h1>
335 <form id="alias" method="post" action="admin/user/{$user->login()}#emails">
337 <table class="bicol" cellpadding="2" cellspacing="0">
339 <th class="alias" colspan="3">
340 Alias email de l'utilisateur
343 {iterate from=$aliases item=a}
344 <tr class="{cycle values="impair,pair"}">
346 <input type="radio" name='best' {if $a.best}checked="checked"{/if} value='{$a.alias}' onclick="this.form.submit()" />
349 {if $a.for_life}<strong>{$a.alias}</strong>{else}{$a.alias}{/if}
350 {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if}
353 <td>garanti à vie*</td>
356 <a href="javascript:del_alias('{$a.alias}')">{icon name=cross}</a>
361 <tr class="{cycle values="impair,pair"}">
362 <td colspan="2" class="detail">
363 <input type="text" name="email" size="29" maxlength="60" value="" />
366 <input type="hidden" name="uid" value="{$user->id()}" />
367 <input type="hidden" name="del_alias" value="" />
368 <input type="submit" name="add_alias" value="Ajouter" />
371 <tr class="{cycle values="impair,pair"}">
372 <td colspan="3" class="desc">
373 <strong>* à ne modifier qu'avec l'accord express de l'utilisateur !!!</strong>
381 <form id="fwds" method="post" action="admin/user/{$user->login()}#emails">
383 <table class="bicol" cellpadding="2" cellspacing="0">
389 {assign var=actives value=false}
390 {assign var=disabled value=false}
391 {foreach item=mail from=$emails}
392 {cycle assign=class values="impair,pair"}
393 <tr class="{$class}">
394 {if $mail->active && $mail->has_disable()}
395 {assign var=actives value=true}
396 {elseif $mail->disabled && $mail->has_disable()}
397 {assign var=disabled value=true}
400 {if $mail->active}active{elseif $mail->disabled}suspendue{/if}
403 <span class="smaller">
404 {if !$mail->disabled}
405 <a href="javascript:act_fwd('{$mail->email}',{if $mail->active}false{else}true{/if})">
406 {if $mail->active}des{elseif $mail->broken}ré{/if}activer
412 {if $mail->broken}<span style="color: #f00">{/if}
413 {if $mail->email == 'googleapps'}<a href="admin/googleapps/user/{$user->login()}">{/if}
414 {$mail->display_email}
415 {if $mail->email == 'googleapps'}</a>{/if}
416 {if $mail->broken}<em> (en panne)</em></span>{/if}
419 {if $mail->is_removable()}
420 <a href="javascript:del_fwd('{$mail->email}')">{icon name=cross}</a>
424 {if $mail->panne && $mail->panne neq "0000-00-00"}
425 <tr class="{$class}">
426 <td colspan="3" class="smaller" style="color: #f00">
427 {icon name=error title="Panne"}
428 Panne de {$mail->display_email} le {$mail->panne|date_format}
429 {if $mail->panne neq $mail->last}confirmée le {$mail->last|date_format}{/if}
432 <a href="javascript:clean_fwd('{$mail->email}')">effacer les pannes</a>
437 {cycle assign=class values="impair,pair"}
438 <tr class="{$class}">
439 <td class="titre" colspan="2">
443 <input type="text" name="email" size="29" maxlength="60" value="" />
446 <input type="hidden" name="uid" value="{$user->id()}" />
447 <input type="hidden" name="del_fwd" value="" />
448 <input type="hidden" name="clean_fwd" value="" />
449 <input type="hidden" name="activate_fwd" value="" />
450 <input type="hidden" name="deactivate_fwd" value="" />
451 <input type="submit" name="add_fwd" value="Ajouter" />
454 <tr class="{$class}">
455 <td colspan="4" class="center">
457 <input type="submit" name="disable_fwd" value="Désactiver la redirection des emails" />
460 <input type="submit" name="enable_fwd" value="Réactiver la redirection des emails" />
467 {javascript name="ajax"}
468 {test_email hruid=$user->login()}
470 <h1>Autres adresses de l'utilisateur</h1>
472 <table class="bicol">
474 <th colspan="3">Mailing lists auquelles l'utilisateur appartient</th>
476 {foreach from=$mlists item=mlist}
479 <a href="http://listes.polytechnique.org/members/{$mlist.addr|replace:"@":"_"}">
484 <input type="checkbox" disabled="disabled" {if $mlist.sub}checked="checked"{/if} /> Membre
487 <input type="checkbox" disabled="disabled" {if $mlist.own}checked="checked"{/if} /> Modérateur
494 <table class="bicol">
496 <th>Virtual aliases auquel l'utilisateur appartient</th>
498 {foreach from=$virtuals item=virtual}
499 <tr class="{cycle values="impair,pair"}">
507 <h1>Gestion des autorisations d'authentification externe</h1>
509 <form id="openid" method="post" action="admin/user/{$user->login()}#authext">
511 <table class="bicol">
513 <th colspan="2">Sites de confiance</th>
515 {iterate from=$openid item=site}
516 <tr class="{cycle values="pair,impair"}">
517 <td><a href="{$site.url}">{$site.url}</a></td>
518 <td><a href="javascript:del_openid({$site.id})">{icon name=cross}</a></td>
522 <div><input type="hidden" name="del_openid"/></div>
527 <h1>Gestion de l'accès au forums</h1>
529 <form id="bans" method="post" action="admin/user/{$user->login()}#forums">
531 <table class="bicol">
534 Permissions sur les forums
542 <input type="text" name="write_perm" size="32" maxlength="255" value="{$bans.write_perm}" />
545 <a href="javascript:ban_write()">Bannir</a>
553 <input type="text" name="read_perm" size="32" maxlength="255" value="{$bans.read_perm}" />
556 <a href="javascript:ban_read()">Bannir</a>
564 <input type="text" name="comment" size="40" maxlength="255" value="{$bans.comment}" />
569 <input type="hidden" name="uid" value="{$user->id()}" />
570 <input type="submit" name="b_edit" value="Modifier" />
578 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}