Fusion: strip leading particules from names when comparing them
[platal.git] / templates / newsletter / submit.tpl
index 5d3dbb9..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  *}
 
 <h1>Proposer un article pour la prochaine Lettre mensuelle</h1>
 
-{if $submited}
+{if t($submited)}
 
 <p>
-ton article a bien été pris en compte.
+Ton article a bien été pris en compte.
 </p>
 
 <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}
 
 <form action="nl/submit" method='post'>
-  <table class='tinybicol'>
+  <table class='bicol'>
     <tr><th>Version texte</th></tr>
     <tr id='text'>
     <td><pre>{$art->toText()}</pre></td>
     </tr>
-    {if $art->check()}
     <tr><th>Version html</th></tr>
     <tr id='html'>
       <td>
@@ -60,13 +59,14 @@ Il te faut te limiter à 8 lignes de 68 caractères.
         </div>
       </td>
     </tr>
+    {if $art->check()}
     <tr>
       <th>Soumettre</th>
     </tr>
     <tr>
       <td>
         Si tu es content de ton article, tu peux le soumettre.
-        Sinon, tu peux continuer à l'éditer en dessous
+        Sinon, tu peux continuer à l'éditer en dessous.
       </td>
     </tr>
     <tr>
@@ -74,7 +74,7 @@ Il te faut te limiter à 8 lignes de 68 caractères.
         <input type='hidden' value="{$smarty.request.title}" name='title' />
         <input type='hidden' value="{$art->body()}" name="body" />
         <input type='hidden' value="{$art->append()}" name='append' />
-        <input type='submit' name='valid' value='soumettre' />
+        <input type='submit' name='valid' value='Soumettre' />
       </td>
     </tr>
     {/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">
@@ -120,10 +125,10 @@ Tu peux <a href='nl/submit#conseils'>lire les conseils de rédaction</a> avant d
           {icon name=information title="Syntaxe wiki"} Voir les marqueurs de mise en forme autorisés
         </a>
       </td>
-    <tr>
+    </tr>
     <tr class='pair'>
       <td colspan='2' class='center'>
-        <input type='submit' name='see' value='visualiser' />
+        <input type='submit' name='see' value='Visualiser' />
       </td>
     </tr>
   </table>
@@ -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: *}