diff default/input/field.html @ 20:8fa2fd2e928e

default: added i18n support
author Goffi <goffi@goffi.org>
date Sun, 21 May 2017 16:10:44 +0200
parents d4a8afa7b590
children 38328c57f3ef
line wrap: on
line diff
--- a/default/input/field.html	Fri May 19 12:59:43 2017 +0200
+++ b/default/input/field.html	Sun May 21 16:10:44 2017 +0200
@@ -1,7 +1,7 @@
 {% macro choices(name, choices_list, checked=none) %}
-    {% for choice in choices_list %}
+    {% for choice, label in choices_list %}
         <div class="form_input">
-            <input id="{{'field'|next_gidx}}" type="radio" name="{{name}}" value="{{choice}}"{{" checked" if checked==choice}}><label for="{{'field'|cur_gidx}}">{{choice}}</label>
+            <input id="{{'field'|next_gidx}}" type="radio" name="{{name}}" value="{{choice}}"{{" checked" if checked==choice}}><label for="{{'field'|cur_gidx}}">{{label}}</label>
         </div>
     {% endfor %}
 {% endmacro %}
@@ -17,5 +17,5 @@
 {% endmacro %}
 
 {% macro submit() %}
-    <input type="submit" value="Send">
+    <input type="submit" value="{{_("Send")}}">
 {% endmacro %}