dropdown.htm 676 B

12345678910111213141516171819
  1. <%+cbi/valueheader%>
  2. <div<%=attr("data-ui-widget", luci.util.serialize_json({
  3. "Dropdown", self:cfgvalue(section) or self.default, self:choices(), {
  4. id = cbid,
  5. name = cbid,
  6. sort = self.keylist,
  7. multiple = self.multiple,
  8. datatype = self.datatype,
  9. optional = self.optional or self.rmempty,
  10. readonly = self.readonly,
  11. maxlength = self.maxlength,
  12. placeholder = self.placeholder,
  13. display_items = self.display or self.size or 3,
  14. dropdown_items = self.dropdown or self.display or self.size or 5,
  15. custom_placeholder = self.custom or
  16. (self.multiple and translate("Enter custom values") or translate("Enter custom value"))
  17. }
  18. }))%>></div>
  19. <%+cbi/valuefooter%>