Mercurial > libervia-templates
diff default/input/xmlui.html @ 55:d58fdd57df49
input/xmlui: fixed for_name in labels + selection in listWidget
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 05 Nov 2017 21:50:45 +0100 |
parents | dfef430a26ef |
children | 4347910cc594 |
line wrap: on
line diff
--- a/default/input/xmlui.html Fri Oct 27 18:56:21 2017 +0200 +++ b/default/input/xmlui.html Sun Nov 05 21:50:45 2017 +0100 @@ -134,7 +134,7 @@ {% macro label_widget(wid, config, for=none) %} {% if config.form %} <label class="xmlui_widget xmlui_label" {{ {'for':for}|xmlattr }}> - {{wid|item_filter(config.filter)}} + {{wid|item_filter(config.filters)}} </label> {% else %} <span class="xmlui_widget xmlui_label" {{ {'id':none if not for else 'label_%s'|format(for)}|xmlattr }}>{{wid|item_filter(config.filters)}}</span> @@ -167,7 +167,7 @@ {% if config.form %} <select class="xmlui_widget xmlui_list" {{ {'name':wid.name, 'id':id}|xmlattr }}> {% for value,label in wid.options %} - <option {{ {'value':value}|xmlattr }} {{ 'selected' if value == wid.selected }}> + <option {{ {'value':value}|xmlattr }} {{ 'selected' if value in wid.selected }}> {{- label -}} </option> {% endfor %}