8 for val in luci.util.imatch(self:cfgvalue(section)) do
12 selected[self:cfgvalue(section)] = true
15 if not next(selected) and self.default then
16 selected[self.default] = true
20 <div class=
"cbi-dropdown"<%=
22 attr(
"display-items", self.display or self.size or
3) ..
23 attr(
"dropdown-items", self.dropdown or self.display or self.size or
5) ..
24 attr(
"placeholder", self.placeholder or translate(
"-- please select --")) ..
25 ifattr(self.multiple,
"multiple",
"multiple") ..
26 ifattr(self.optional or self.rmempty,
"optional",
"optional")
29 <% local i, key; for i, key in pairs(self.keylist) do %
>
31 attr(
"data-index", i) ..
32 attr(
"data-depends", self:deplist2json(section, self.deplist[i])) ..
34 ifattr(selected[key],
"selected",
"selected")
36 <%=pcdata(self.vallist[i])%
>
39 <% if self.custom then %
>
41 <input type=
"password" style=
"display:none" />
42 <input class=
"create-item-input" type=
"text"<%=
43 attr(
"placeholder", self.custom ~= true and
46 translate(
"Enter custom values") or
47 translate(
"Enter custom value")))