Mercurial > libervia-templates
view default/input/field.html @ 19:422c54e0204a
event: adaptation to changes in backend/Libervia + background_image can now be specified in template data
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 19 May 2017 12:59:43 +0200 |
parents | d4a8afa7b590 |
children | 8fa2fd2e928e |
line wrap: on
line source
{% macro choices(name, choices_list, checked=none) %} {% for choice 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> </div> {% endfor %} {% endmacro %} {% macro int(name, label="", init=0) %} <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) %} <input type="hidden" name="{{name}}" value="{{value}}"> {% endmacro %} {% macro submit() %} <input type="submit" value="Send"> {% endmacro %}