X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fview%2Fcbi%2Fmvalue.htm;h=246ef43aad1c93b1b510808ed63fe8f4631a6c40;hb=6a7eaeb4860bcdfac0ecf4349afc396212c1d467;hp=9118a223815a78cd439814e779ef9e402ff7f4a6;hpb=b50471787feb9c04b365ff239aee8f39eadc236b;p=project%2Fluci.git diff --git a/modules/luci-base/luasrc/view/cbi/mvalue.htm b/modules/luci-base/luasrc/view/cbi/mvalue.htm index 9118a2238..246ef43aa 100644 --- a/modules/luci-base/luasrc/view/cbi/mvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/mvalue.htm @@ -1,19 +1,43 @@ -<% local v = self:valuelist(section) or {} -%> +<% + local i, key + local v = self:valuelist(section) or {} +-%> + <%+cbi/valueheader%> <% if self.widget == "select" then %> - > + <% for i, key in pairs(self.keylist) do -%> + ><%=pcdata(self.vallist[i])%> + <%- end %> -<% elseif self.widget == "checkbox" then - local c = 0; - for i, key in pairs(self.keylist) do - c = c + 1 -%> - /> - ><%=self.vallist[i]%>
-<% if c == self.size then c = 0 %>
-<% end end %> +<% elseif self.widget == "checkbox" then %> +
+ <% for i, key in pairs(self.keylist) do %> + > + /> + > + <%=pcdata(self.vallist[i])%> + + <% if i == self.size then write('
') end %> + <% end %> +
<% end %> <%+cbi/valuefooter%>