3 local br = self.orientation == "horizontal" and ' ' or '<br />'
7 <% if self.widget == "select" then %>
8 <select class="cbi-input-select" data-update="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(tostring(self:cfgvalue(section) or self.default) == key, "selected", "selected")
20 %>><%=pcdata(self.vallist[i])%></option>
23 <% elseif self.widget == "radio" then %>
24 <div<%= attr("id", cbid) %>>
25 <% for i, key in pairs(self.keylist) do %>
27 attr("id", cbid.."-"..key) ..
28 attr("data-index", i) ..
29 attr("data-depends", self:deplist2json(section, self.deplist[i]))
31 <input class="cbi-input-radio" data-update="click change" type="radio"<%=
34 ifattr((self:cfgvalue(section) or self.default) == key, "checked", "checked")
36 <%=pcdata(self.vallist[i])%>
38 <% if i == self.size then write(br) end %>