luci-base: mvalue.htm: fix reading back multi value options

Fixes: 2a229e50c ("luci-base: fix cbi mvalue templates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-07-07 21:26:24 +02:00
parent 2a229e50cf
commit f4c87f4dc4

View file

@ -1,6 +1,14 @@
<%+cbi/valueheader%>
<%
local util = require "luci.util"
local values = {}
local value
for value in util.imatch(self:cfgvalue(section) or self.default) do
values[#values+1] = value
end
%>
<div<%=attr("data-ui-widget", luci.util.serialize_json({
"Select", self:cfgvalue(section) or self.default, self:choices(), {
"Select", values, self:choices(), {
id = cbid,
name = cbid,
size = self.size,