diff 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
line wrap: on
line diff
--- a/sat_templates/templates/bulma/input/field.html	Sat Feb 27 20:44:01 2021 +0100
+++ b/sat_templates/templates/bulma/input/field.html	Sat Feb 27 20:49:51 2021 +0100
@@ -63,8 +63,8 @@
     </div>
 {% endmacro %}
 
-{% macro int(name, label="", init=0) %}
-    {{ field("number", name=name, label=label, value=init, step=1, min=0) }}
+{% macro int(name, label="", init=0, class="", control_class="", placeholder=none, min=none, max=none, step=none, in_group=false) %}
+    {{ 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}) }}
 {% endmacro %}
 
 {% macro checkbox(name, label="", checked=false) %}