changeset 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 a5dc14675d5e
children ea67eba3199d
files default/input/xmlui.html
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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 %}