detail_lvalue.htm 1.3 KB

1234567891011121314151617181920212223
  1. <!-- ++ BEGIN ++ Dynamic DNS ++ detail_lvalue.htm ++ -->
  2. <!-- no value header to suppress next line -->
  3. &#160;
  4. <% if self.widget == "select" then %>
  5. <select class="cbi-input-select" onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
  6. <% for i, key in pairs(self.keylist) do -%>
  7. <option id="cbi-<%=self.config.."-"..section.."-"..self.option.."-"..key%>"<%= attr("value", key) .. ifattr(tostring(self:cfgvalue(section) or self.default) == key, "selected", "selected") %>><%=striptags(self.vallist[i])%></option>
  8. <%- end %>
  9. </select>
  10. <% elseif self.widget == "radio" then
  11. local c = 0
  12. for i, key in pairs(self.keylist) do
  13. c = c + 1
  14. %>
  15. <input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr((self:cfgvalue(section) or self.default) == key, "checked", "checked") %> />
  16. <label<%= attr("for", cbid..c) %>></label>
  17. <label<%= attr("for", cbid..c) %>><%=self.vallist[i]%></label>
  18. <% if c == self.size then c = 0 %><% if self.orientation == "horizontal" then %>&#160;<% else %><br /><% end %>
  19. <% end end %>
  20. <% end %>
  21. <%+cbi/valuefooter%>
  22. <!-- ++ END ++ Dynamic DNS ++ detail_lvalue.htm ++ -->