Mercurial > libervia-templates
comparison default/input/field.html @ 27:38328c57f3ef
field: added new text and textarea macros
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Jun 2017 20:23:40 +0200 |
parents | 8fa2fd2e928e |
children | 0520b7c9dcc0 |
comparison
equal
deleted
inserted
replaced
26:d782227c088d | 27:38328c57f3ef |
---|---|
10 <span class="form_input"> | 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> | 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> | 12 </span> |
13 {% endmacro %} | 13 {% endmacro %} |
14 | 14 |
15 {% macro text(name, label="", placeholder="") %} | |
16 <span class="form_input"> | |
17 <label id="{{'field'|next_gidx}}">{{label}}</label><input id="{{'field'|cur_gidx}}" type="text" name="{{name}}" placeholder="{{placeholder}}"></label> | |
18 </span> | |
19 {% endmacro %} | |
20 | |
21 {% macro textarea(name, rows=10, cols=50, placeholder='') %} | |
22 <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea> | |
23 {% endmacro %} | |
24 | |
15 {% macro meta(name, value) %} | 25 {% macro meta(name, value) %} |
16 <input type="hidden" name="{{name}}" value="{{value}}"> | 26 <input type="hidden" name="{{name}}" value="{{value}}"> |
17 {% endmacro %} | 27 {% endmacro %} |
18 | 28 |
19 {% macro submit() %} | 29 {% macro submit() %} |