# HG changeset patch # User Goffi # Date 1614455041 -3600 # Node ID cdf88211b86bca4d9b410e625d3900afede3b393 # Parent 877f01720036f8593b2a6fd541dc5a0294191627 bulma (input/field): `field` macro now has `control_class` and `in_group` attributes: - `control_class` is used to specify additional classes for the control (when `class` is used for classes of the of the `field`) - when `in_group` is `true`, `field` is not added, only the `control` is used. This is useful for grouping elements in the same field diff -r 877f01720036 -r cdf88211b86b sat_templates/templates/bulma/input/field.html --- a/sat_templates/templates/bulma/input/field.html Sat Feb 20 13:39:11 2021 +0100 +++ b/sat_templates/templates/bulma/input/field.html Sat Feb 27 20:44:01 2021 +0100 @@ -1,16 +1,18 @@ {# macros to create form fields #} -{% macro field(type, name, label="", value=none, class='', help="", required=false, icon_left=none, icon_right=none, attrs=none) %} +{% macro field(type, name, label="", value=none, class="", control_class="", help="", required=false, icon_left=none, icon_right=none, in_group=false, attrs=none) %} {# generic field "class" keyword can be used to add classes additional kwargs will be passed as attributes #} -
+ {% if not in_group %} +
+ {% endif %} {% set cur_id = name|next_gidx %} {% if label %} {% endif %} -
+
{% if icon_left %} @@ -30,10 +32,12 @@ {% if caller %} {{ caller() }} {% endif %} -
+ {% if not in_group %} +
+ {% endif %} {% endmacro %} -{% macro select(name, options_list, selected=none, required=false, multiple=false, class='') %} +{% macro select(name, options_list, selected=none, required=false, multiple=false, class="") %} {# selection of elements with {% endmacro %} -{% macro choices(name, choices_list, checked=none, class='') %} +{% macro choices(name, choices_list, checked=none, class="") %}
{% for choice, label in choices_list %}