Mercurial > libervia-templates
changeset 27:38328c57f3ef
field: added new text and textarea macros
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Jun 2017 20:23:40 +0200 |
parents | d782227c088d |
children | 4bf00291b895 |
files | default/input/field.html |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/default/input/field.html Sat Jun 24 20:22:36 2017 +0200 +++ b/default/input/field.html Sat Jun 24 20:23:40 2017 +0200 @@ -12,6 +12,16 @@ </span> {% endmacro %} +{% macro text(name, label="", placeholder="") %} + <span class="form_input"> + <label id="{{'field'|next_gidx}}">{{label}}</label><input id="{{'field'|cur_gidx}}" type="text" name="{{name}}" placeholder="{{placeholder}}"></label> + </span> +{% endmacro %} + +{% macro textarea(name, rows=10, cols=50, placeholder='') %} + <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea> +{% endmacro %} + {% macro meta(name, value) %} <input type="hidden" name="{{name}}" value="{{value}}"> {% endmacro %}