comparison sat_templates/templates/bulma/input/field.html @ 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 2e548a9830c6
comparison
equal deleted inserted replaced
316:81689d346cf6 317:ae903ca0ed66
112 112
113 {% macro meta(name, value) %} 113 {% macro meta(name, value) %}
114 <input type="hidden" name="{{name}}" value="{{value}}"> 114 <input type="hidden" name="{{name}}" value="{{value}}">
115 {% endmacro %} 115 {% endmacro %}
116 116
117 {% macro submit(text=_("Send"), id=none, class="", icon=none, attrs=none) %} 117 {% macro submit(text=_("Send"), id=none, class="", icon=none, attrs=none, color="is-primary") %}
118 {# submit button 118 {# submit button
119 119
120 @param text(str): label of the button 120 @param text(str): label of the button
121 @param id(none, str): id of the element 121 @param id(none, str): id of the element
122 #} 122 #}
123 <div class="control {{class}}"> 123 <div class="control {{class}}">
124 <button{{ {'id': id}|xmlattr }} class="button is-primary form_submit {{class}}" type="submit"{{(attrs or {})|xmlattr}}> 124 <button{{ {'id': id}|xmlattr }} class="button {{color}} form_submit {{class}}" type="submit"{{(attrs or {})|xmlattr}}>
125 {{text}} 125 {{text}}
126 {% if icon %} 126 {% if icon %}
127 <span class="icon is-small"> 127 <span class="icon is-small">
128 <i class="icon-{{icon}}"></i> 128 <i class="icon-{{icon}}"></i>
129 </span> 129 </span>