Fixes vim mode line.
[platal.git] / templates / include / field.promo.tpl
index dcc2c8c..b52f766 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<script type="text/javascript">//<![CDATA[
+{if $full}
+<table class="bicol">
+{/if}
+  <tr id="{$prefix}promo_min_tr" class="impair">
+    <td class="titre">Promotion la plus ancienne</td>
+    <td>
+    <script type="text/javascript">//<![CDATA[
     var prefix = "{$prefix}";
     {literal}
     function updateRange()
       min = document.getElementById(prefix + 'promo_min').value;
       max = document.getElementById(prefix + 'promo_max').value;
       if (isNaN(min) || (min != 0 && (min < 1900 || min > 2020))) {
-        range.innerHTML = '<span class="erreur">La promotion minimum n\'est pas valide.</span>';
+        range.innerHTML = '<span class="erreur">La promotion minimum n\'est pas valide.<\/span>';
         return false;
       } else if (isNaN(max) || (max != 0 && (max < 1900  || max > 2020))) {
-        range.innerHTML = '<span class="erreur">La promotion maximum n\'est pas valide.</span>';
+        range.innerHTML = '<span class="erreur">La promotion maximum n\'est pas valide.<\/span>';
         return false;
       } else if (max != 0 && min != 0 && max < min) {
-        range.innerHTML = '<span class="erreur">L\'intervalle de promotion est inversé.</span>';
+        range.innerHTML = '<span class="erreur">L\'intervalle de promotion est inversé.<\/span>';
         return false;
       } else if (max == 0 && min == 0) {
         range.innerHTML = 'L\'annonce est destinée à toutes les promotions.';
         range.innerHTML = "L\'annonce est destinée à la promotion " + min + ".";
       } else {
         range.innerHTML = "L\'annonce est destinée aux promotions de " + min + " à " + max + ' (incluses).';
-      } 
+      }
       return true;
-    } 
+    }
     {/literal}
 //]]></script>
-
-{if $full}
-<table class="bicol">
-{/if}
-  <tr id="{$prefix}promo_min_tr" class="impair">
-    <td class="titre">Promotion la plus ancienne</td>
-    <td>
       <input type="text" name="{$min_field_name|default:"promo_min"}" id="{$prefix}promo_min"
              size="4" maxlength="4" value="{$promo_min|default:0}"
              onkeyup="return updateRange();" onchange="return updateRange();" /> incluse
@@ -85,4 +84,4 @@
 </table>
 {/if}
 
-{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}
+{* vim:set et sws=2 sts=2 sw=2 fenc=utf-8: *}