X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fview%2Fcbi%2Flvalue.htm;h=61759fdd41ff588c7687e9e46a1e635a4083bedc;hp=ac63e9efd43068de9350f3b14d4287c8f7101b46;hb=afdc349ab4ff6bc89b0527f36d5197b7896d86f4;hpb=8f409a45abb8cc4fda068c6a24085c467f3e37d8;ds=sidebyside diff --git a/modules/luci-base/luasrc/view/cbi/lvalue.htm b/modules/luci-base/luasrc/view/cbi/lvalue.htm index ac63e9efd..61759fdd4 100644 --- a/modules/luci-base/luasrc/view/cbi/lvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/lvalue.htm @@ -1,18 +1,42 @@ +<% + local i, key + local br = self.orientation == "horizontal" and ' ' or '
' +%> + <%+cbi/valueheader%> <% if self.widget == "select" then %> - > + <% for i, key in pairs(self.keylist) do -%> + ><%=pcdata(self.vallist[i])%> + <%- end %> -<% elseif self.widget == "radio" 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 %><% if self.orientation == "horizontal" then %> <% else %>
<% end %> -<% end end %> +<% elseif self.widget == "radio" then %> + > + <% for i, key in pairs(self.keylist) do %> + > + /> + <%=pcdata(self.vallist[i])%> + + <% if i == self.size then write(br) end %> + <% end %> + <% end %> <%+cbi/valuefooter%>