comparison 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
comparison
equal deleted inserted replaced
19:422c54e0204a 20:8fa2fd2e928e
1 {% macro choices(name, choices_list, checked=none) %} 1 {% macro choices(name, choices_list, checked=none) %}
2 {% for choice in choices_list %} 2 {% for choice, label in choices_list %}
3 <div class="form_input"> 3 <div class="form_input">
4 <input id="{{'field'|next_gidx}}" type="radio" name="{{name}}" value="{{choice}}"{{" checked" if checked==choice}}><label for="{{'field'|cur_gidx}}">{{choice}}</label> 4 <input id="{{'field'|next_gidx}}" type="radio" name="{{name}}" value="{{choice}}"{{" checked" if checked==choice}}><label for="{{'field'|cur_gidx}}">{{label}}</label>
5 </div> 5 </div>
6 {% endfor %} 6 {% endfor %}
7 {% endmacro %} 7 {% endmacro %}
8 8
9 {% macro int(name, label="", init=0) %} 9 {% macro int(name, label="", init=0) %}
15 {% macro meta(name, value) %} 15 {% macro meta(name, value) %}
16 <input type="hidden" name="{{name}}" value="{{value}}"> 16 <input type="hidden" name="{{name}}" value="{{value}}">
17 {% endmacro %} 17 {% endmacro %}
18 18
19 {% macro submit() %} 19 {% macro submit() %}
20 <input type="submit" value="Send"> 20 <input type="submit" value="{{_("Send")}}">
21 {% endmacro %} 21 {% endmacro %}