Fusion: strip leading particules from names when comparing them
[platal.git] / templates / newsletter / submit.tpl
index 94e5889..53f00bd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -22,7 +22,7 @@
 
 <h1>Proposer un article pour la prochaine Lettre mensuelle</h1>
 
-{if $submited}
+{if t($submited)}
 
 <p>
 Ton article a bien été pris en compte.
@@ -30,17 +30,17 @@ Ton article a bien été pris en compte.
 
 <p>
 Nous te recontacterons éventuellement (certainement vers la fin du mois) si nous avons des
-renseignements à te demander à son sujet !
+renseignements à te demander à son sujet&nbsp;!
 </p>
 
 {else}
 
 
-{if $art}
+{if t($art)}
 
 {if !$art->check()}
 <p class='erreur'>
-L'article que tu as proposé est trop long !<br />
+L'article que tu as proposé est trop long&nbsp;!<br />
 Il te faut te limiter à 8 lignes de 68 caractères.
 </p>
 {/if}
@@ -98,19 +98,24 @@ Tu peux <a href='nl/submit#conseils'>lire les conseils de rédaction</a> avant d
     <tr class="impair">
         <td class='titre'>Sujet</td>
       <td>
-        <input size='60' type='text' value='{$smarty.request.title}' name='title' />
+        <input size='60' maxlength='60' type='text' value='{$smarty.request.title}' name='title' />
       </td>
     </tr>
     <tr class="pair">
       <td class='titre'>Contenu</td>
       <td>
-        <textarea cols="68" rows="8" name='body'>{if $art}{$art->body()}{/if}</textarea>
+        <textarea onchange="{literal}$.post('nl/remaining/', {'body': this.value}, function(data) {$('#remaining').html(data)}){/literal}"
+                  onkeyup="{literal}$.post('nl/remaining/', {'body': this.value}, function(data) {$('#remaining').html(data)}){/literal}"
+                  cols="68" rows="8" name="body" >{if t($art)}{$art->body()}{/if}</textarea>
       </td>
     </tr>
+    <tr class="pair">
+      <td id="remaining" class="center" colspan="2"></td>
+    </tr>
     <tr class="impair">
-      <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
+      <td class='titre'>Ajouts (emails, contacts, tarifs, site web&hellip;)</td>
       <td>
-        <textarea cols="68" rows="3" name='append'>{if $art}{$art->append()}{/if}</textarea>
+        <textarea cols="68" rows="3" name='append'>{if t($art)}{$art->append()}{/if}</textarea>
       </td>
     </tr>
     <tr class="pair smaller">
@@ -134,4 +139,4 @@ Tu peux <a href='nl/submit#conseils'>lire les conseils de rédaction</a> avant d
 
 {/if}
 
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
+{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}