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:
parent
2a229e50cf
commit
f4c87f4dc4
1 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,14 @@
|
||||||
<%+cbi/valueheader%>
|
<%+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({
|
<div<%=attr("data-ui-widget", luci.util.serialize_json({
|
||||||
"Select", self:cfgvalue(section) or self.default, self:choices(), {
|
"Select", values, self:choices(), {
|
||||||
id = cbid,
|
id = cbid,
|
||||||
name = cbid,
|
name = cbid,
|
||||||
size = self.size,
|
size = self.size,
|
||||||
|
|
Loading…
Reference in a new issue