Mercurial > libervia-templates
comparison default/input/field.html @ 18:d4a8afa7b590
input/field: <label> is separated from <input>
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 May 2017 01:00:29 +0200 |
parents | 8b5615a1bf3d |
children | 8fa2fd2e928e |
comparison
equal
deleted
inserted
replaced
17:48b831ab4238 | 18:d4a8afa7b590 |
---|---|
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 in choices_list %} |
3 <label><input type="radio" name="{{name}}" value="{{choice}}"{{"checked" if checked==choice}}>{{choice}}</label> | 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> | |
5 </div> | |
4 {% endfor %} | 6 {% endfor %} |
5 {% endmacro %} | 7 {% endmacro %} |
6 | 8 |
7 {% macro int(name, label="", init=0) %} | 9 {% macro int(name, label="", init=0) %} |
8 <label><input type="number" name="{{name}}" value="{{init}}" step="1" min="0">{{label}}</label> | 10 <span class="form_input"> |
11 <label id="{{'field'|next_gidx}}">{{label}}</label><input id="{{'field'|cur_gidx}}" type="number" name="{{name}}" value="{{init}}" step="1" min="0"></label> | |
12 </span> | |
9 {% endmacro %} | 13 {% endmacro %} |
10 | 14 |
11 {% macro meta(name, value) %} | 15 {% macro meta(name, value) %} |
12 <input type="hidden" name="{{name}}" value="{{value}}"> | 16 <input type="hidden" name="{{name}}" value="{{value}}"> |
13 {% endmacro %} | 17 {% endmacro %} |