From f4c87f4dc4d5c91ea7413e451949b7c6d44b66ca Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 7 Jul 2019 21:26:24 +0200 Subject: luci-base: mvalue.htm: fix reading back multi value options Fixes: 2a229e50c ("luci-base: fix cbi mvalue templates") Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/view/cbi/mvalue.htm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/luci-base/luasrc/view/cbi') diff --git a/modules/luci-base/luasrc/view/cbi/mvalue.htm b/modules/luci-base/luasrc/view/cbi/mvalue.htm index d1fb803678..97e40abfa2 100644 --- a/modules/luci-base/luasrc/view/cbi/mvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/mvalue.htm @@ -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 +%>