2 <% if self.widget == "select" then %>
3 <select class="cbi-input-select" data-update="change"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
4 <% for i, key in pairs(self.keylist) do -%>
5 <option id="cbi-<%=self.config.."-"..section.."-"..self.option.."-"..key%>"<%= attr("value", key) .. ifattr(tostring(self:cfgvalue(section) or self.default) == key, "selected", "selected") .. attr("data-index", i) .. attr("data-depends", self:deplist2json(section, self.deplist[i])) %>><%=striptags(self.vallist[i])%></option>
8 <% elseif self.widget == "radio" then
10 for i, key in pairs(self.keylist) do
13 <input class="cbi-input-radio" data-update="click change" type="radio"<%= attr("id", cbid.."-"..key) .. attr("name", cbid) .. attr("value", key) .. ifattr((self:cfgvalue(section) or self.default) == key, "checked", "checked") .. attr("data-index", i) .. attr("data-depends", self:deplist2json(section, self.deplist[i])) %> />
14 <label<%= attr("for", cbid.."-"..key) %>><%=self.vallist[i]%></label>
15 <% if c == self.size then c = 0 %><% if self.orientation == "horizontal" then %> <% else %><br /><% end %>