Improves email combobox.
[platal.git] / templates / emails / redirect.tpl
index 493d0c7..a56e173 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -79,9 +79,9 @@
 
     function removeRedirect(link, email)
     {
-        if (confirm("Supprimer l'adresse " + email + " ?")) {
+        if (confirm("Supprimer l'adresse " + email + " ?")) {
           $.get(link.href, {},function() {
-            $('tr[@id=line_' + email.replace('@', '_at_') + ']').remove();
+            $('#line_' + email.replace('@', '_at_').replace('.','\\.')).remove();
             showRemove();
             activeEnable();
           });
   {test_email}
   <div id="redirect-msg" style="position:absolute;"></div><br />
   <div class="center">
+    <form action="emails/redirect" method="post">
     <table class="bicol" summary="Adresses de redirection">
       <tr>
         <th>Redirection</th>
             {icon name=cross title="Supprimer"}
           </a>
           {else}
-          {if $e->sufficient}<span class="remove_email"></span>{/if}
+          {if $e->sufficient}<span class="remove_email"><span style="display:none">&nbsp;</span></span>{/if}
           <a href="emails/redirect#{$e->email}">{icon name=information title="Plus d'informations"}</a>
           {/if}
         </td>
       </tr>
       {/foreach}
-      <form action="emails/redirect" method="post">
         {cycle values="pair,impair" assign=class_combobox}
+        {$error_email}
         {include file="include/emails.combobox.tpl" name="email" val=$email class=$class_combobox error=$error_email i="0"}
-        <tr class=$class_combobox><td colspan="4"><div>
+        <tr class="{$class_combobox}"><td colspan="4"><div>
           <input type="submit" value="ajouter" name="emailop" />
           {xsrf_token_field}
         </div></td></tr>
-      </form>
     </table>
+    </form>
     <script type="text/javascript">showRemove(); activeEnable();</script>
   </div>
 <p class="smaller center">
   tes emails, Google Calendar, Google Docs&hellip;) sur une adresse polytechnique.org.
 </p>
 
-<table class="bicol" summary="Compte de stockage" id="googleapps">
+<table class="bicol" summary="Compte de stockage">
   <col width="55%" />
   <col width="45%" />
   <tr>