changeset 317:ae903ca0ed66

bulma (input/field): color can now be specified for `submit` button
author Goffi <goffi@goffi.org>
date Thu, 29 Apr 2021 15:52:34 +0200
parents 81689d346cf6
children b7e5ce6bc82d
files sat_templates/templates/bulma/input/field.html
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/input/field.html	Thu Apr 29 15:52:04 2021 +0200
+++ b/sat_templates/templates/bulma/input/field.html	Thu Apr 29 15:52:34 2021 +0200
@@ -114,14 +114,14 @@
     <input type="hidden" name="{{name}}" value="{{value}}">
 {% endmacro %}
 
-{% macro submit(text=_("Send"), id=none, class="", icon=none, attrs=none) %}
+{% macro submit(text=_("Send"), id=none, class="", icon=none, attrs=none, color="is-primary") %}
     {# submit button
 
     @param text(str): label of the button
     @param id(none, str): id of the element
     #}
     <div class="control {{class}}">
-        <button{{ {'id': id}|xmlattr }} class="button is-primary form_submit {{class}}" type="submit"{{(attrs or {})|xmlattr}}>
+        <button{{ {'id': id}|xmlattr }} class="button {{color}} form_submit {{class}}" type="submit"{{(attrs or {})|xmlattr}}>
             {{text}}
             {% if icon %}
                 <span class="icon is-small">