Autocomplete enterprise name in profile edition. (Closes #836)
[platal.git] / templates / xnetgrp / membres-edit.tpl
index de3f371..6baa2ec 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
 <script type="text/javascript">
-  {literal}
-    function showInformations(box)
-    {
-        var state = (box.value == 'ext') ? '' : 'none';
-        document.getElementById('prenom').style.display = state;
-        document.getElementById('sexe').style.display = state;
-    }
-  {/literal}
+{literal}
+  function showInformations(box)
+  {
+      var state = (box.value == 'ext') ? '' : 'none';
+      document.getElementById('prenom').style.display = state;
+      document.getElementById('sexe').style.display = state;
+      document.getElementById('make_X').style.display = state;
+  }
+
+  function showXInput(box)
+  {
+     if (box.checked) {
+       document.getElementById('make_X_cb').style.display = 'none';
+       document.getElementById('make_X_login').style.display = '';
+     }
+  }
+{/literal}
 </script>
 
-<h1>{$asso.nom} : gestion des membres</h1>
+<h1>{$asso.nom}&nbsp;: gestion des membres</h1>
 
 <p>
-[<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
+[<a href='{$platal->ns}annuaire'>Retour à l'annuaire</a>]
 </p>
 
 <h2>
-  Édition du profil de {$user.prenom} {$user.nom}
+  É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>
       <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>
+          <option value="1" {if $user.perms}selected="selected"{/if}>Animateur</option>
         </select>
       </td>
     </tr>
     {if $user.origine neq X}
     <tr class="impair">
       <td class="titre">
-        Type d'utilisateur :
+        Type d'utilisateur&nbsp;:
       </td>
       <td>
         <select name="origine" onchange="showInformations(this); return true">
@@ -74,7 +83,7 @@
     </tr>
     <tr id="prenom" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
       <td class="titre">
-        Prénom :
+        Prénom&nbsp;:
       </td>
       <td>
         <input type="text" value="{$user.prenom}" name="prenom" size="40" />
@@ -82,7 +91,7 @@
     </tr>
     <tr class="impair">
       <td class="titre">
-        Nom :
+        Nom&nbsp;:
       </td>
       <td>
         <input type="text" value="{$user.nom}" name="nom" size="40" />
@@ -90,7 +99,7 @@
     </tr>
     <tr id="sexe" class="impair" {if $user.origine eq "groupe"}style="display: none"{/if}>
       <td class="titre">
-        Sexe :
+        Sexe&nbsp;:
       </td>
       <td>
         <select name="sexe">
         <input type="text" value="{$user.email}" name="email" size="40" />
       </td>
     </tr>
+    <tr id="make_X" {if $user.origine eq "groupe"}style="display: none"{/if}>
+      <td colspan="2">
+        <span id="make_X_cb">
+          <input type="checkbox" name="is_x" id="is_x" onclick="showXInput(this);" onchange="showXInput(this);" />
+          <label for="is_x">coche cette case si il s'agit d'un X</label>
+        </span>
+        <span id="make_X_login" style="display: none">
+          <span class="titre">Identifiant (prenom.nom.promo)&nbsp;:</span>
+          <input type="text" name="login_X" value="" />
+        </span>
+      </td>
+    </tr>
     {/if}
   </table>
 
       <td>
         <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
       </td>
-      <td>{$liste.desc}</td>
+      <td>{$liste.desc|smarty:nodefaults}</td>
       <td class='right'>{$liste.nbsub}</td>
     </tr>
     {foreachelse}
 </form>
 
 
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}