summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/cbi/mvalue.htm
blob: 1f4f4dbcc605fce44d8e6fec71b9fa8a16736027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<%+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", values, self:choices(), {
		id = cbid,
		name = cbid,
		size = self.size,
		sort = self.keylist,
		multiple = true,
		widget = self.widget,
		datatype = self.datatype,
		optional = self.optional or self.rmempty,
		readonly = self.readonly,
		placeholder = self.placeholder
	}
}))%>></div>
<%+cbi/valuefooter%>