Mercurial > libervia-templates
comparison sat_templates/templates/bulma/input/field.html @ 305:552daa830d42
bulma (input/field): `int` macro has new attributes:
`class`, `control_class`, `placeholder`, `min`, `max`, `step`, `in_group` are now
available.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 20:49:51 +0100 |
parents | cdf88211b86b |
children | 206a98e3d06b |
comparison
equal
deleted
inserted
replaced
304:cdf88211b86b | 305:552daa830d42 |
---|---|
61 </label> | 61 </label> |
62 {% endfor %} | 62 {% endfor %} |
63 </div> | 63 </div> |
64 {% endmacro %} | 64 {% endmacro %} |
65 | 65 |
66 {% macro int(name, label="", init=0) %} | 66 {% macro int(name, label="", init=0, class="", control_class="", placeholder=none, min=none, max=none, step=none, in_group=false) %} |
67 {{ field("number", name=name, label=label, value=init, step=1, min=0) }} | 67 {{ field("number", name=name, label=label, value=init, class=class, control_class=control_class, in_group=in_group, attrs={"min": min, "max": max, "step": step, "placeholder": placeholder}) }} |
68 {% endmacro %} | 68 {% endmacro %} |
69 | 69 |
70 {% macro checkbox(name, label="", checked=false) %} | 70 {% macro checkbox(name, label="", checked=false) %} |
71 {% set cur_id = name|next_gidx %} | 71 {% set cur_id = name|next_gidx %} |
72 <label for="{{cur_id}}" class="label checkbox">{{label}}</label> | 72 <label for="{{cur_id}}" class="label checkbox">{{label}}</label> |