| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2011 Polytechnique.org *} |
| 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 | |
| 23 | <script type="text/javascript">//<![CDATA[ |
| 24 | {literal} |
| 25 | function xStateChange(box) |
| 26 | { |
| 27 | var state = (box.checked ? '' : 'none'); |
| 28 | document.getElementById('xnom').style.display = state; |
| 29 | document.getElementById('xprenom').style.display = state; |
| 30 | document.getElementById('xpromo').style.display = state; |
| 31 | document.getElementById('xsearch').style.display = state; |
| 32 | $('#search_result').updateHtml('{/literal}{$platal->ns}{literal}member/new/ajax?login=' |
| 33 | + $('#email').val()); |
| 34 | } |
| 35 | |
| 36 | var nom; |
| 37 | var prenom; |
| 38 | var promo; |
| 39 | function searchX() |
| 40 | { |
| 41 | if (document.getElementById('nom').value == nom |
| 42 | && document.getElementById('prenom').value == prenom |
| 43 | && document.getElementById('promo').value == promo) { |
| 44 | return; |
| 45 | } |
| 46 | var nom = document.getElementById('nom').value; |
| 47 | var prenom = document.getElementById('prenom').value; |
| 48 | var promo = document.getElementById('promo').value; |
| 49 | $('#search_result').updateHtml('{/literal}{$platal->ns}{literal}member/new/ajax?prenom=' + prenom + '&nom=' + nom + '&promo=' + promo); |
| 50 | } |
| 51 | {/literal} |
| 52 | //]]></script> |
| 53 | |
| 54 | <h1>{$asso->nom} : Ajout d'un membre</h1> |
| 55 | |
| 56 | <form method="post" action="{$platal->ns}member/new/"> |
| 57 | {xsrf_token_field} |
| 58 | <ul class='descr'> |
| 59 | <li> |
| 60 | Pour ajouter un X dans ton groupe, il suffit d'entrer ici une de ses |
| 61 | adresses email @polytechnique.org. S'il n'est pas inscrit à Polytechnique.org |
| 62 | coche la case qui se trouve sous le formulaire et indique ses noms, prénoms et |
| 63 | promotions. |
| 64 | </li> |
| 65 | <li> |
| 66 | Pour ajouter un extérieur dans ton groupe, il suffit d'entrer ici son |
| 67 | adresse email, tu seras ensuite redirigé vers une page te permettant |
| 68 | d'éditer son profil (nom, prenom…). |
| 69 | </li> |
| 70 | </ul> |
| 71 | <table class="tinybicol"> |
| 72 | <tr> |
| 73 | <td class="center" colspan="2"> |
| 74 | <input type="text" id="email" name="email" size="40" value="{$platal->argv[1]}" /> |
| 75 | <input type='submit' value='Ajouter' |
| 76 | onclick='this.form.action += this.form.email.value' /> |
| 77 | </td> |
| 78 | </tr> |
| 79 | <tr> |
| 80 | <td colspan="2"> |
| 81 | <input type="checkbox" id="x" name="x" onchange="xStateChange(this);" /> |
| 82 | {* TODO: adapts text for masters and doctorates when required. *} |
| 83 | <label for="x">Coche cette case s'il s'agit d'un X non inscrit à Polytechnique.org.</label> |
| 84 | </td> |
| 85 | </tr> |
| 86 | <tr id="xnom" style="display: none"> |
| 87 | <td class="titre">Nom :</td> |
| 88 | <td><input type="text" id="nom" name="nom" size="20" value="" onkeyup="searchX();" /></td> |
| 89 | </tr> |
| 90 | <tr id="xprenom" style="display: none"> |
| 91 | <td class="titre">Prénom :</td> |
| 92 | <td><input type="text" id="prenom" name="prenom" size="20" value="" onkeyup="searchX();" /></td> |
| 93 | </tr> |
| 94 | <tr id="xpromo" style="display: none"> |
| 95 | <td class="titre">Promotion :</td> |
| 96 | {* TODO: add examples for masters and doctorates when required. *} |
| 97 | <td><input type="text" id="promo" name="promo" size="4" value="" onkeyup="searchX();" /> <small>(X2004)</small></td> |
| 98 | </tr> |
| 99 | <tr id="xsearch" style="display: none" class="pair"> |
| 100 | <td colspan="2" id="search_result"> |
| 101 | {include file="xnet/groupe/membres-new-search.tpl"} |
| 102 | </td> |
| 103 | </tr> |
| 104 | </table> |
| 105 | </form> |
| 106 | |
| 107 | {literal} |
| 108 | <script type="text/javascript"> |
| 109 | $("#email").focus(); |
| 110 | </script> |
| 111 | {/literal} |
| 112 | |
| 113 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |