{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2007 Polytechnique.org *}
+{* Copyright (C) 2003-2011 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{literal}
function showInformations(box)
{
- var state = (box.value == 'ext') ? '' : 'none';
+ var state = (box.value != 'virtual') ? '' : 'none';
document.getElementById('prenom').style.display = state;
document.getElementById('sexe').style.display = state;
document.getElementById('make_X').style.display = state;
+ document.getElementById('password').style.display = state;
}
function showXInput(box)
{/literal}
</script>
-<h1>{$asso.nom} : gestion des membres</h1>
+<h1>{$asso->nom} : gestion des membres</h1>
<p>
[<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
</p>
<h2>
- Édition du profil de {$user.prenom} {$user.nom}
- {if $user.origine eq 'X'}
- (X{$user.promo})
- <a href="https://www.polytechnique.org/profile/{$user.alias}">{icon name=user_suit title="fiche"}</a>
- {/if}
- <a href="{$platal->ns}member/del/{$user.email}">{icon name=delete title="Suppression du compte"}</a>
- <a href="mailto:{$user.email}">{icon name=email title="mail"}</a>
+ Édition du profil de {profile user=$user groupperms=false sex=false promo=true}
+ <a href="mailto:{$user->bestEmail()}">{icon name=email title="mail"}</a>
</h2>
<form method="post" action="{$platal->ns}member/{$platal->argv[1]}">
+ {xsrf_token_field}
<table cellpadding="0" cellspacing="0" class='tinybicol'>
+ {if hasPerm('admin')}
<tr class="pair">
<td class="titre">
- Permissions:
+ Identifiant unique :
</td>
<td>
- <select name="is_admin">
- <option value="0" {if !$user.perms}selected="selected"{/if}>Membre</option>
- <option value="1" {if $user.perms}selected="selected"{/if}>Administrateur</option>
+ {$user->hruid}
+ <a href="https://www.polytechnique.org/admin/user/{$user->hruid}">{icon name="user_edit" title="Administer"}</a>
+ </td>
+ </tr>
+ {/if}
+ <tr class="pair">
+ <td class="titre">
+ Permissions :
+ </td>
+ <td>
+ <select name="group_perms">
+ <option value="membre" {if $user->group_perms eq 'membre'}selected="selected"{/if}>Membre</option>
+ <option value="admin" {if $user->group_perms eq 'admin'}selected="selected"{/if}>Animateur</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="pair">
+ <td class="titre">
+ Poste :
+ </td>
+ <td>
+ <select name="group_position">
+ <option value=""{if $user->group_position eq ''} selected="selected"{/if}></option>
+ {foreach from=$positions item=position}
+ <option value="{$position}"{if $user->group_position eq $position} selected="selected"{/if}>{$position}</option>
+ {/foreach}
</select>
</td>
</tr>
- {if $user.origine neq X}
+ {if $user->type eq 'virtual' || ($user->type eq 'xnet' && !$user->perms)}
<tr class="impair">
<td class="titre">
- Type d'utilisateur :
+ Type d'utilisateur :
</td>
<td>
- <select name="origine" onchange="showInformations(this); return true">
- <option value="ext" {if $user.origine eq "ext"}selected="selected"{/if}>Personne physique</option>
- <option value="groupe" {if $user.origine eq "groupe"}selected="selected"{/if}>Personne morale</option>
+ <select name="type" onchange="showInformations(this); return true">
+ <option value="xnet" {if $user->type neq 'virtual'}selected="selected"{/if}>Personne physique</option>
+ <option value="virtual" {if $user->type eq "virtual"}selected="selected"{/if}>Personne morale</option>
</select>
</td>
</tr>
- <tr id="prenom" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
+ <tr class="impair">
+ <td class="titre">Nom complet :</td>
+ <td>{$user->fullName()}</td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Nom annuaire :</td>
+ <td>{$user->directoryName()}</td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Nom :</td>
+ <td>
+ <input type="text" value="{$user->lastname}" name="lastname" size="40" />
+ </td>
+ </tr>
+ {if $user->type neq "virtual"}
+ <tr class="impair">
+ <td class="titre">Prénom :</td>
+ <td>
+ <input type="text" value="{$user->firstname}" name="firstname" size="40" />
+ </td>
+ </tr>
+ <tr class="impair">
+ <td class="titre">Nom affiché :</td>
+ <td>
+ <input type="text" value="{$user->displayName()}" name="display_name" size="40" />
+ </td>
+ </tr>
+ {/if}
+ <tr id="sexe" class="impair" {if $user->type eq "virtual"}style="display: none"{/if}>
<td class="titre">
- Prénom :
+ Sexe :
</td>
<td>
- <input type="text" value="{$user.prenom}" name="prenom" size="40" />
+ <select name="sex">
+ <option value="male"{if !$user->isFemale()} selected="selected"{/if}>Homme</option>
+ <option value="female"{if $user->isFemale()} selected="selected"{/if}>Femme</option>
+ </select>
</td>
</tr>
+ {if !$user->perms}
<tr class="impair">
<td class="titre">
- Nom :
+ Email :
</td>
<td>
- <input type="text" value="{$user.nom}" name="nom" size="40" />
+ <input type="text" value="{$user->forlifeEmail()}" name="email" size="40" />
</td>
</tr>
- <tr id="sexe" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
+ {/if}
+ {/if}
+ <tr class="impair">
<td class="titre">
- Sexe :
+ Commentaire :
</td>
<td>
- <select name="sexe">
- <option value="0"{if $user.sexe eq 0} selected="selected"{/if}>Homme</option>
- <option value="1"{if $user.sexe eq 1} selected="selected"{/if}>Femme</option>
- </select>
+ <input type="text" name="comm" value="{$user->group_comm}" size="40" maxlength="255" /><br />
+ <small>Poste, origine… (accessible à toutes les personnes autorisées à consulter l'annuaire)</small>
</td>
</tr>
+ {if $asso->has_nl}
<tr class="impair">
<td class="titre">
- Email:
+ Newsletter :
</td>
<td>
- <input type="text" value="{$user.email}" name="email" size="40" />
+ <label>Inscrit<input type="radio" name="newsletter" value="1" {if $nl_registered eq 1}checked="checked"{/if} /></label>
+ -
+ <label><input type="radio" name="newsletter" value="0" {if $nl_registered eq 0}checked="checked"{/if} />Non inscrit</label>
</td>
</tr>
- <tr id="make_X" {if $user.origine eq "groupe"}style="display: none"{/if}>
+ {/if}
+ {if $user->type eq 'xnet'}
+ <tr id="make_X">
<td colspan="2">
<span id="make_X_cb">
- <input type="checkbox" name="is_x" id="is_x" onchange="showXInput(this);" />
- <label for="is_x">coche cette case si il s'agit d'un X</label>
+ <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
+ <label for="is_x">coche cette case s'il s'agit d'un X ou un master ou doctorant de l'X</label>
</span>
<span id="make_X_login" style="display: none">
<span class="titre">Identifiant (prenom.nom.promo) :</span>
</td>
</tr>
{/if}
+ {if $user->type eq 'xnet' && $suggest}
+ <tr>
+ <td colspan="2">
+ <label>
+ <input type="checkbox" name="suggest" />
+ coche cette case si tu souhaites qu'un compte « Extérieur » soit créé
+ pour cette personne et que nous lui envoyions un email afin qu'il ait
+ accès aux nombreuses fonctionnalités de Polytechnique.net (inscription
+ aux évènements, télépaiement, modération des listes de diffusion…)
+ </label>
+ </td>
+ </tr>
+ {/if}
+ {if $user->type eq 'xnet' && $pending_xnet_account}
+ <tr>
+ <td colspan="2">
+ <label>
+ <input type="checkbox" name="again" />
+ Cette personne a un compte « Extérieur » en attente d'activation de sa part. Pour la relancer, il suffit
+ de cocher la case ci-contre.
+ </label>
+ </td>
+ </tr>
+ {/if}
</table>
<h2>Abonnement aux listes</h2>
<th>Alias</th>
</tr>
- {foreach from=$alias item=a}
+ {foreach from=$alias key=address item=sub}
<tr>
<td align='right'>
- <input type='hidden' name='ml3[{$a.alias}]' value='{$a.sub}' />
- <input type='checkbox' name='ml4[{$a.alias}]' {if $a.sub}checked="checked"{/if} />
+ <input type='hidden' name='ml3[{$address}]' value='{$sub}' />
+ <input type='checkbox' name='ml4[{$address}]' {if $sub}checked="checked"{/if} />
</td>
<td>
- <a href='{$platal->ns}alias/admin/{$a.alias}'>{$a.alias}</a>
+ <a href='{$platal->ns}alias/admin/{$address}'>{$address}</a>
</td>
</tr>
{foreachelse}
<div class="center">
<br />
- <input type="submit" name='change' value="Valider ces changements" />
+ <input type="submit" name='change' value="Valider ces changements" onclick="return hashResponse('new_plain_password', false, false, false);" />
<input type="reset" value="Annuler ces changements" />
- </div>
+ </div>
</form>