#530: Can identify new members of a group as an unregistered user of Polytechnique.org
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 14 Nov 2006 11:14:56 +0000 (11:14 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 14 Nov 2006 11:14:56 +0000 (11:14 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1077 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
modules/lists/lists.inc.php
modules/xnetevents.php
modules/xnetevents/xnetevents.inc.php
modules/xnetgrp.php
templates/xnet/groupe/announce-edit.tpl
templates/xnet/groupe/annuaire.tpl
templates/xnet/groupe/membres-add.tpl
templates/xnetevents/edit.tpl

index fe549cb..4ec0f54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@ Bug/Wish:
     * Events:
         - #517: URL catcher update (www).                                  -Car
         - #525: Add a user-friendly id for newsletters                     -FRU
+        - #530: Members can be identified as a unregistered user           -FRU
 
     * Lists:
         - #485: Can moderate pure-HTML mails                               -FRU
index b8216c7..0b7f3c9 100644 (file)
@@ -40,13 +40,20 @@ function list_sort_owners(&$members, $tri_promo = true) {
                 $membres[0][] = Array('l' => $mem);
             }
         } else {
-            $res = XDB::query('SELECT m2.uid, m1.prenom, m1.nom
+            $res = XDB::query('SELECT m2.uid,
+                                      IF(m2.origine="X", u.prenom, m1.prenom) AS prenom,
+                                      IF(m2.origine="X", u.nom, m1.nom) AS nom,
+                                      IF(m2.origine="X", u.promo, "non-X") AS promo
                                  FROM groupex.membres AS m1
                             LEFT JOIN groupex.membres AS m2 ON(m1.email=m2.email AND m2.asso_id={?})
+                            LEFT JOIN auth_user_md5   AS u  ON(m2.origine = "X" AND m2.uid = u.user_id)
                                 WHERE m1.email={?}', $globals->asso('id'), $mem);
-            if (list($uid, $prenom, $nom) = $res->fetchOneRow()) {
-                $key = $tri_promo ? 0 : strtoupper($nom{0});
-                $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $mem, 'x' => $uid, 'p' => (!$tri_promo ? 'non-X' : null));
+            if (list($uid, $prenom, $nom, $promo) = $res->fetchOneRow()) {
+                $key = $tri_promo ? ($promo != 'non-X' ? $promo : 0) : strtoupper($nom{0});
+                if ($tri_promo) {
+                    $promo = null;
+                }
+                $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $mem, 'x' => $uid, 'p' => $promo);
             } else {
                 $membres[0][] = Array('l' => $mem, 'p' => (!$tri_promo ? 'non-X' : null));
             }
index 15eaa7f..4aa57ee 100644 (file)
@@ -505,19 +505,19 @@ class XnetEventsModule extends PLModule
             // change the price paid by a participant
             if (Env::v('adm') == 'prix' && $member) {
                 XDB::execute("UPDATE groupex.evenements_participants
-                                           SET paid = IF(paid + {?} > 0, paid + {?}, 0)
-                                         WHERE uid = {?} AND eid = {?}",
+                                 SET paid = IF(paid + {?} > 0, paid + {?}, 0)
+                               WHERE uid = {?} AND eid = {?}",
                         strtr(Env::v('montant'), ',', '.'),
                         strtr(Env::v('montant'), ',', '.'),
-                        $member['uid'], $eid);
+                        $member['uid'], $evt['eid']);
             }
 
             // change the number of personns coming with a participant
             if (Env::v('adm') == 'nbs' && $member) {
                 $res = XDB::query("SELECT paid
-                                               FROM groupex.evenements_participants
-                                              WHERE uid = {?} AND eid = {?}",
-                                            $member['uid'], $eid);
+                                     FROM groupex.evenements_participants
+                                    WHERE uid = {?} AND eid = {?}",
+                                  $member['uid'], $evt['eid']);
 
                 $paid = intval($res->fetchOneCell());
                 $nbs  = Post::v('nb', array());
@@ -527,18 +527,19 @@ class XnetEventsModule extends PLModule
 
                     if ($nb) {
                         XDB::execute("REPLACE INTO groupex.evenements_participants
-                                               VALUES ({?}, {?}, {?}, {?}, {?})",
-                                               $eid, $member['uid'], $id, $nb, $paid);
+                                            VALUES ({?}, {?}, {?}, {?}, {?})",
+                                               $evt['eid'], $member['uid'], $id, $nb, $paid);
                     } else {
                         XDB::execute("DELETE FROM groupex.evenements_participants
-                                               WHERE uid = {?} AND eid = {?} AND item_id = {?}",
-                                               $member['uid'], $eid, $id);
+                                            WHERE uid = {?} AND eid = {?} AND item_id = {?}",
+                                               $member['uid'], $evt['eid'], $id);
                     }
                 }
 
-                $res = XDB::query("SELECT uid FROM groupex.evenements_participants
-                                            WHERE uid = {?} AND eid = {?}",
-                                            $member['uid'], $eid);
+                $res = XDB::query("SELECT uid
+                                     FROM groupex.evenements_participants
+                                    WHERE uid = {?} AND eid = {?}",
+                                            $member['uid'], $evt['eid']);
                 $u = $res->fetchOneCell();
                 subscribe_lists_event($u, $member['uid'], $evt);
             }
@@ -565,7 +566,7 @@ class XnetEventsModule extends PLModule
                   LEFT JOIN  groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
                   LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = ep.uid )
                       WHERE  ep.eid = {?} '.$whereitemid.'
-                   GROUP BY  UPPER(SUBSTRING(IF(u.nom IS NULL,m.nom,u.nom), 1, 1))', $eid);
+                   GROUP BY  UPPER(SUBSTRING(IF(u.nom IS NULL,m.nom,u.nom), 1, 1))', $evt['eid']);
 
         $alphabet = array();
         $nb_tot = 0;
@@ -601,9 +602,9 @@ class XnetEventsModule extends PLModule
                 "SELECT IF(u.nom_usage<>'', u.nom_usage, u.nom) AS nom, u.prenom,
                         u.promo, a.alias AS email, t.montant
                    FROM {$globals->money->mpay_tprefix}transactions AS t
-                 INNER JOIN auth_user_md5 AS u ON(t.uid = u.user_id)
-                 INNER JOIN aliases AS a ON (a.id = t.uid AND a.type='a_vie' )
-                  LEFT JOIN groupex.evenements_participants AS ep ON(ep.uid = t.uid AND ep.eid = {?})
+             INNER JOIN auth_user_md5 AS u ON(t.uid = u.user_id)
+             INNER JOIN aliases AS a ON (a.id = t.uid AND a.type='a_vie' )
+              LEFT JOIN groupex.evenements_participants AS ep ON(ep.uid = t.uid AND ep.eid = {?})
                   WHERE t.ref = {?} AND ep.uid IS NULL",
                   $evt['eid'], $evt['paiement_id']);
             $page->assign('oublis', $res->total());
index 5a4de5e..1c3b147 100644 (file)
@@ -117,24 +117,24 @@ function get_event_participants($evt, $item_id, $tri, $limit = '') {
     $pay_id = $evt['paiement_id'];
 
     $query =
-        "SELECT  IF(u.nom IS NULL,m.nom,IF(u.nom_usage<>'', u.nom_usage, u.nom)) AS nom,
-                   IF(u.nom IS NULL,m.prenom,u.prenom) AS prenom,
-                   IF(u.nom IS NULL,'extérieur',u.promo) AS promo,
-                   IF(u.nom IS NULL,m.email,a.alias) AS email,
-                   IF(u.nom IS NULL,0,FIND_IN_SET('femme', u.flags)) AS femme,
+          "SELECT  IF(m.origine != 'X',m.nom,IF(u.nom_usage<>'', u.nom_usage, u.nom)) AS nom,
+                   IF(m.origine != 'X',m.prenom,u.prenom) AS prenom,
+                   IF(m.origine != 'X','extérieur',u.promo) AS promo,
+                   IF(m.origine != 'X' OR u.perms = 'pending',m.email,a.alias) AS email,
+                   IF(m.origine != 'X',m.sexe,FIND_IN_SET('femme', u.flags)) AS femme,
                    m.perms='admin' AS admin,
-                   NOT(u.nom IS NULL) AS x,
-                  ep.uid, ep.paid, SUM(nb) AS nb 
-               FROM  groupex.evenements_participants AS ep
-        INNER JOIN  groupex.evenements AS e ON (ep.eid = e.eid)
-         LEFT JOIN  groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
-          LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = ep.uid )
-          LEFT JOIN  aliases         AS a ON ( a.id = ep.uid AND a.type='a_vie' )
-              WHERE  ep.eid = {?}
+                   (m.origine = 'X') AS x,
+                          ep.uid, ep.paid, SUM(nb) AS nb 
+             FROM  groupex.evenements_participants AS ep
+       INNER JOIN  groupex.evenements AS e ON (ep.eid = e.eid)
+           LEFT JOIN  groupex.membres AS m ON ( ep.uid = m.uid AND e.asso_id = m.asso_id)
+        LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = ep.uid )
+        LEFT JOIN  aliases         AS a ON ( a.id = ep.uid AND a.type='a_vie' )
+            WHERE  ep.eid = {?}
                     ".(($item_id)?" AND item_id = $item_id":"")."
                     $where
-          GROUP BY  ep.uid
-          ORDER BY  $tri $limit";
+         GROUP BY  ep.uid
+         ORDER BY  $tri $limit";
 
     if ($item_id) {
         $res = XDB::query($query, $eid);
index ab4b9b2..66eef6d 100644 (file)
@@ -34,12 +34,19 @@ function get_infos($email)
     }
 
     $res = XDB::query(
-            "SELECT  uid, nom, prenom, email, email AS email2, perms='admin', origine
+            "SELECT  uid, nom, prenom, email, email AS email2, perms='admin', origine, sexe
                FROM  groupex.membres
               WHERE  $field = {?} AND asso_id = {?}", $email, $globals->asso('id'));
 
     if ($res->numRows()) {
-        return $res->fetchOneAssoc();
+        $user = $res->fetchOneAssoc();
+        if ($user['origine'] == 'X') {
+            $res = XDB::query("SELECT nom, prenom, promo, FIND_IN_SET(flags, 'femme') AS sexe
+                                 FROM auth_user_md5
+                                WHERE user_id = {?}", $user['uid']);
+            $user = array_merge($user, $res->fetchOneAssoc());
+        }
+        return $user;                        
     } elseif ($dom == 'polytechnique.org' || $dom == 'm4x.org') {
         $res = XDB::query(
                 "SELECT  user_id AS uid, u.promo,
@@ -47,7 +54,8 @@ function get_infos($email)
                          u.prenom, b.alias,
                          CONCAT(b.alias, '@m4x.org') AS email,
                          CONCAT(b.alias, '@polytechnique.org') AS email2,
-                         m.perms='admin' AS perms, m.origine
+                         m.perms='admin' AS perms, m.origine,
+                         FIND_IN_SET(flags, 'femme') AS sexe
                    FROM  auth_user_md5   AS u
              INNER JOIN  aliases         AS a ON ( u.user_id = a.id AND a.type != 'homonyme' )
              INNER JOIN  aliases         AS b ON ( u.user_id = b.id AND b.type = 'a_vie' )
@@ -82,6 +90,8 @@ class XnetGrpModule extends PLModule
                  => $this->make_hook('admin_member', AUTH_MDP),
             '%grp/member/new'
                  => $this->make_hook('admin_member_new', AUTH_MDP),
+            '%grp/member/new/ajax'
+                 => $this->make_hook('admin_member_new_ajax', AUTH_MDP, '', NO_AUTH),         
             '%grp/member/del'
                  => $this->make_hook('admin_member_del', AUTH_MDP),
 
@@ -308,7 +318,7 @@ class XnetGrpModule extends PLModule
         if ($group == 'initiale')
             $res = XDB::iterRow(
                         'SELECT  UPPER(SUBSTRING(
-                                     IF(m.origine="X", IF(u.nom_usage<>"", u.nom_usage, u.nom),m.nom),
+                                    IF(m.origine="X", IF(u.nom_usage<>"", u.nom_usage, u.nom),m.nom),
                                      1, 1)) as letter, COUNT(*)
                            FROM  groupex.membres AS m
                       LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = m.uid )
@@ -371,16 +381,17 @@ class XnetGrpModule extends PLModule
                            IF(m.origine='X',u.prenom,m.prenom) AS prenom,
                            IF(m.origine='X',u.promo,'extérieur') AS promo,
                            IF(m.origine='X',u.promo,'') AS promo_o,
-                           IF(m.origine='X',a.alias,m.email) AS email,
+                           IF(m.origine='X' AND u.perms != 'pending',a.alias,m.email) AS email,
                            IF(m.origine='X',FIND_IN_SET('femme', u.flags), m.sexe) AS femme,
                            m.perms='admin' AS admin,
                            m.origine='X' AS x,
+                           u.perms!='pending' AS inscrit,
                            m.uid
                      FROM  groupex.membres AS m
                 LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = m.uid )
                 LEFT JOIN  aliases         AS a ON ( a.id = m.uid AND a.type='a_vie' )
                     WHERE  m.asso_id = {?} $ini
-                           AND (m.origine = 'ext' OR u.perms != 'pending')
+                           AND (m.origine = 'ext' OR u.perms != 'pending' OR m.email IS NOT NULL)
                  ORDER BY  $tri
                     LIMIT  {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE);
 
@@ -652,6 +663,7 @@ class XnetGrpModule extends PLModule
         global $globals;
 
         new_groupadmin_page('xnet/groupe/membres-add.tpl');
+        $page->addJsLink('ajax.js');
 
         if (is_null($email)) {
             return;
@@ -677,18 +689,67 @@ class XnetGrpModule extends PLModule
             }
         } else {
             if (isvalid_email($email)) {
-                $res = XDB::query('SELECT MAX(uid)+1 FROM groupex.membres');
-                $uid = max(intval($res->fetchOneCell()), 50001);
-                XDB::execute('INSERT INTO  groupex.membres (uid,asso_id,origine,email)
-                                        VALUES({?},{?},"ext",{?})', $uid,
-                                        $globals->asso('id'), $email);
-                pl_redirect("member/$email");
+                if (Env::v('x') && Env::has('userid') && Env::i('userid')) {
+                    $uid = Env::i('userid');
+                    $res = XDB::query("SELECT *
+                                         FROM auth_user_md5
+                                         WHERE user_id = {?} AND perms = 'pending'", $uid);
+                    if ($res->numRows() == 1) {
+                        XDB::execute('INSERT INTO groupex.membres (uid, asso_id, origine, email)
+                                           VALUES ({?}, {?}, "X", {?})',
+                                               $uid, $globals->asso('id'), $email);
+                        if (Env::v('market')) {
+                            $res   = XDB::query('SELECT COUNT(*)
+                                                   FROM register_marketing
+                                                  WHERE uid={?} AND email={?}', $uid, $email);
+                            if (!$res->fetchOneCell()) {
+                                XDB::execute("INSERT INTO  register_marketing (uid,sender,email,date,last,nb,type,hash)
+                                                   VALUES  ({?}, {?}, {?}, NOW(), 0, 0, {?}, '')",
+                                             $uid, S::v('uid'), $email, Env::v('market_from')); 
+                                require_once('validations.inc.php');
+                                $req = new MarkReq(S::v('uid'), $uid, $email, Env::v('market_from') == 'user');
+                                $req->submit();
+                            }            
+                        }
+                        pl_redirect("member/$email");
+                    }
+                    $page->trig("Utilisateur invalide");
+                } else {
+                    $res = XDB::query('SELECT MAX(uid)+1 FROM groupex.membres');
+                    $uid = max(intval($res->fetchOneCell()), 50001);
+                    XDB::execute('INSERT INTO  groupex.membres (uid,asso_id,origine,email)
+                                            VALUES({?},{?},"ext",{?})', $uid,
+                                            $globals->asso('id'), $email);
+                    pl_redirect("member/$email");
+                }
             } else {
                 $page->trig("« <strong>$email</strong> » n'est pas une adresse mail valide");
             }
         }
     }
 
+    function handler_admin_member_new_ajax(&$page)
+    {
+        $page->changeTpl('xnet/groupe/membres-new-search.tpl', NO_SKIN);
+        list($nom, $prenom) = str_replace(array('-', ' ', "'"), '%', array(Env::v('nom'), Env::v('prenom')));
+        $where = "perms = 'pending'";
+        if (!empty($nom)) {
+            $where .= " AND nom LIKE '%$nom%'";
+        }
+        if (!empty($prenom)) {
+            $where .= " AND prenom LIKE '%$prenom%'";
+        }
+        if (is_numeric(Env::v('promo'))) {
+            $where .= " AND promo = " . Env::i('promo');
+        }
+        $res = XDB::iterator("SELECT user_id, nom, prenom, promo
+                                FROM auth_user_md5
+                               WHERE $where");
+        if ($res->total() < 30) {
+            $page->assign("choix", $res);
+        }
+    }
+
     function handler_admin_member_del(&$page, $user = null)
     {
         global $globals;
@@ -813,15 +874,15 @@ class XnetGrpModule extends PLModule
                 if($state == $ask) continue;
                 if($ask) {
                     XDB::query("INSERT INTO  virtual_redirect (vid,redirect)
-                                               SELECT  vid,{?} FROM virtual WHERE alias={?}",
-                                         $user['email'], $ml);
+                                     SELECT  vid,{?} FROM virtual WHERE alias={?}",
+                               $user['email'], $ml);
                     $page->trig("{$user['prenom']} {$user['nom']} a été abonné à $ml");
                 } else {
                     XDB::query("DELETE FROM  virtual_redirect
-                                                USING  virtual_redirect
-                                           INNER JOIN  virtual USING(vid)
-                                                WHERE  redirect={?} AND alias={?}",
-                                         $user['email'], $ml);
+                                      USING  virtual_redirect
+                                 INNER JOIN  virtual USING(vid)
+                                      WHERE  redirect={?} AND alias={?}",
+                               $user['email'], $ml);
                     $page->trig("{$user['prenom']} {$user['nom']} a été désabonné de $ml");
                 }
             }
index 4f1da7a..a452b81 100644 (file)
@@ -24,7 +24,7 @@
 {literal}
 function visibilityChange(box)
 {
-    var state = (box.checked ? 'none' : 'normal');
+    var state = (box.checked ? 'none' : '');
     document.getElementById('promo_titre').style.display = state;
     document.getElementById('promo_min').style.display = state;
     document.getElementById('promo_max').style.display = state;
index c95f304..a99fb63 100644 (file)
@@ -34,13 +34,6 @@ Les membres ext
 Tu peux également :
 </p>
 <ul class="descr">
-  <li>
-    <a href="{$platal->ns}annuaire/vcard/photos/{$asso.diminutif}.vcf">
-      {icon name=vcard title="Carte de visite"} 
-      Ajouter les membres à ton carnet d'adresse
-    </a>
-    (<a href="{$platal->ns}annuaire/vcard/{$asso.diminutif}.vcf">sans les photos</a>)
-  </li>
   {if $admin}
   <li>
     <a href="{$platal->ns}member/new">
@@ -55,6 +48,13 @@ Tu peux 
     </a>
   </li>
   {/if}
+  <li>
+    <a href="{$platal->ns}annuaire/vcard/photos/{$asso.diminutif}.vcf">
+      {icon name=vcard title="Carte de visite"} 
+      Ajouter les membres à ton carnet d'adresse
+    </a>
+    (<a href="{$platal->ns}annuaire/vcard/{$asso.diminutif}.vcf">sans les photos</a>)
+  </li>
 </ul>
 
 <p class="center">
@@ -96,8 +96,12 @@ Tu peux 
     <td>{if $m.admin}<strong>{/if}{if $m.femme}&bull;{/if}{$m.prenom} {$m.nom|strtoupper}{if $m.admin}</strong>{/if}</td>
     <td>{if $m.admin}<strong>{/if}{$m.promo}{if $m.admin}</strong>{/if}</td>
     <td class="center">
-      {if $m.x}
+      {if $m.inscrit}
       <a href="https://www.polytechnique.org/profile/{$m.email}" class="popup2">{icon name=user_suit title="fiche"}</a>
+      {elseif $m.x}
+      <a href="https://www.polytechnique.org/marketing/public/{$m.uid}">{icon name=user_suit title="marketing"}</a>
+      {/if}
+      {if $m.inscrit}
       <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf">{icon name=vcard title="[vcard]"}</a>
       <a href="mailto:{$m.email}@polytechnique.org">{icon name=email title="mail"}</a>
       {else}
index 7a839eb..9202918 100644 (file)
 {*                                                                        *}
 {**************************************************************************}
 
+<script type="text/javascript">
+{literal}
+function xStateChange(box)
+{
+    var state = (box.checked ? '' : 'none');
+    document.getElementById('xnom').style.display = state;
+    document.getElementById('xprenom').style.display = state;
+    document.getElementById('xpromo').style.display = state;
+    document.getElementById('xsearch').style.display = state;
+}
+
+var nom;
+var prenom;
+var promo;
+function searchX()
+{
+    if (document.getElementById('nom').value == nom
+       && document.getElementById('prenom').value == prenom
+       && document.getElementById('promo').value == promo) {
+       return;
+    }
+    var nom = document.getElementById('nom').value;
+    var prenom = document.getElementById('prenom').value;
+    var promo = document.getElementById('promo').value;
+    Ajax.update_html('xsearch',
+      '{/literal}{$platal->ns}{literal}member/new/ajax?prenom=' + prenom + '&nom=' + nom + '&promo=' + promo);
+}
+{/literal}
+</script>
+
 <h1>{$asso.nom} : Ajout d'un membre</h1>
 
 <form method="post" action="{$platal->ns}member/new/">
-  <p class="descr">
   <ul class='descr'>
     <li>
       Pour ajouter un X dans ton groupe, il suffit d'entrer ici une de ses
-      adresses mail @polytechnique.org.
+      adresses mail @polytechnique.org. Si il n'est pas inscrit à Polytechnique.org
+      coche la case qui se trouve sous le formulaire et indique ses noms, prénoms et
+      promotions.
     </li>
     <li>
       Pour ajouter un extérieur dans ton groupe, il suffit d'entrer ici son
       d'éditer son profil (nom, prenom, ...)
     </li>
   </ul>
-  </p>
-  <div class="center">
-    <input type="text" name="email" size="40" value="{$platal->argv[1]}" />
-    <input type='submit' value='Ajouter'
-      onclick='this.form.action += this.form.email.value' />
-  </div>
+  <table class="tinybicol">
+    <tr>
+      <td class="center" colspan="2">
+        <input type="text" name="email" size="40" value="{$platal->argv[1]}" />
+        <input type='submit' value='Ajouter'
+          onclick='this.form.action += this.form.email.value' />
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2">
+        <input type="checkbox" name="x" onchange="xStateChange(this);" />
+        Coche cette case si il s'agit d'un X non inscrit à Polytechnique.org
+      </td>
+    </tr>
+    <tr id="xnom" style="display: none">
+      <td class="titre">Nom :</td>
+      <td><input type="text" id="nom" name="nom" size="20" value="" onchange="searchX();" /></td>
+    </tr>
+    <tr id="xprenom" style="display: none">
+      <td class="titre">Prénom :</td>
+      <td><input type="text" id="prenom" name="prenom" size="20" value="" onchange="searchX();" /></td>
+    </tr>
+    <tr id="xpromo" style="display: none">
+      <td class="titre">Promotion :</td>
+      <td><input type="text" id="promo" name="promo" size="4" value="" onchange="searchX();" /></td>
+    </tr>
+    <tr id="xsearch" style="display: none" class="pair">
+      {include file="xnet/groupe/membres-new-search.tpl"}
+    </tr>
+  </table>
 </form>
 
 {* vim:set et sw=2 sts=2 sws=2: *}
index af3b3dc..5cbf9d0 100644 (file)
@@ -136,7 +136,7 @@ function deadlineChange(box)
     <tr>
       <th colspan="2">
         Paiement&nbsp;:&nbsp;
-        <select name="paiement_id" onchange="document.getElementById('new_pay').style.display=(value &lt; 0?'normal':'none')">
+        <select name="paiement_id" onchange="document.getElementById('new_pay').style.display=(value &lt; 0?'':'none')">
           {if $evt.paiement_id eq -2}
           <option value='-2'>Paiement en attente de validation</option>
           {/if}