3 local v = self:valuelist(section) or {}
7 <% if self.widget == "select" then %>
8 <select class="cbi-input-select" multiple="multiple" data-update="click change"<%=
11 ifattr(self.size, "size")
13 <% for i, key in pairs(self.keylist) do -%>
15 attr("id", cbid.."-"..key) ..
17 attr("data-index", i) ..
18 attr("data-depends", self:deplist2json(section, self.deplist[i])) ..
19 ifattr(luci.util.contains(v, key), "selected", "selected")
20 %>><%=pcdata(self.vallist[i])%></option>
23 <% elseif self.widget == "checkbox" then %>
25 <% for i, key in pairs(self.keylist) do %>
27 attr("data-index", i) ..
28 attr("data-depends", self:deplist2json(section, self.deplist[i]))
30 <input class="cbi-input-checkbox" type="checkbox" data-update="click change"<%=
31 attr("id", cbid.."-"..key) ..
34 ifattr(luci.util.contains(v, key), "checked", "checked")
36 <label<%= attr("for", cbid.."-"..key)%>></label>
37 <%=pcdata(self.vallist[i])%>
39 <% if i == self.size then write('<br />') end %>