Mercurial > libervia-templates
changeset 18:d4a8afa7b590
input/field: <label> is separated from <input>
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 May 2017 01:00:29 +0200 |
parents | 48b831ab4238 |
children | 422c54e0204a |
files | default/input/field.html |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/default/input/field.html Thu May 04 01:00:29 2017 +0200 +++ b/default/input/field.html Thu May 04 01:00:29 2017 +0200 @@ -1,11 +1,15 @@ {% macro choices(name, choices_list, checked=none) %} {% for choice in choices_list %} - <label><input type="radio" name="{{name}}" value="{{choice}}"{{"checked" if checked==choice}}>{{choice}}</label> + <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> + </div> {% endfor %} {% endmacro %} {% macro int(name, label="", init=0) %} - <label><input type="number" name="{{name}}" value="{{init}}" step="1" min="0">{{label}}</label> + <span class="form_input"> + <label id="{{'field'|next_gidx}}">{{label}}</label><input id="{{'field'|cur_gidx}}" type="number" name="{{name}}" value="{{init}}" step="1" min="0"></label> + </span> {% endmacro %} {% macro meta(name, value) %}