Mercurial > libervia-templates
comparison sat_templates/templates/bulma/input/field.html @ 307:605bce1df126
bulma (input/field): icon can now be specified with `submit` macro
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 20:51:32 +0100 |
parents | 206a98e3d06b |
children | 81689d346cf6 |
comparison
equal
deleted
inserted
replaced
306:206a98e3d06b | 307:605bce1df126 |
---|---|
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='', attrs=none) %} | 117 {% macro submit(text=_("Send"), id=none, class="", icon=none, attrs=none) %} |
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}}>{{text}}</button> | 124 <button{{ {'id': id}|xmlattr }} class="button is-primary form_submit {{class}}" type="submit"{{(attrs or {})|xmlattr}}> |
125 {{text}} | |
126 {% if icon %} | |
127 <span class="icon is-small"> | |
128 <i class="icon-{{icon}}"></i> | |
129 </span> | |
130 {% endif %} | |
131 </button> | |
125 </div> | 132 </div> |
126 {% endmacro %} | 133 {% endmacro %} |