X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fview%2Fcbi%2Fmvalue.htm;h=db17450d27f09409b2a239153aad46dbcaa71fc0;hb=4b3b9be0983e2e766995bcba95bb09859ab3f83d;hp=5d092610ed0b9bfce4a78c44121b42d3e512fe5e;hpb=ad064f0b039839dd333bfe8e9631cbc5218410b0;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 5d092610e..db17450d2 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 not self.oneline then %>
<% else %> <% end %> -<% 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 self.size and (i % self.size) == 0 then write('
') end %> + <% end %> +
<% end %> <%+cbi/valuefooter%>