mvalue.htm 573 B

123456789101112131415161718192021222324
  1. <%+cbi/valueheader%>
  2. <%
  3. local util = require "luci.util"
  4. local values = {}
  5. local value
  6. for value in util.imatch(self:cfgvalue(section) or self.default) do
  7. values[#values+1] = value
  8. end
  9. %>
  10. <div<%=attr("data-ui-widget", luci.util.serialize_json({
  11. "Select", values, self:choices(), {
  12. id = cbid,
  13. name = cbid,
  14. size = self.size,
  15. sort = self.keylist,
  16. multiple = true,
  17. widget = self.widget,
  18. datatype = self.datatype,
  19. optional = self.optional or self.rmempty,
  20. readonly = self.readonly,
  21. placeholder = self.placeholder
  22. }
  23. }))%>></div>
  24. <%+cbi/valuefooter%>