X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fview%2Fcbi%2Flvalue.htm;h=34d02eeca0cb4250be96fe003288409cc8f57dd2;hb=4de35274cab2df740941149fe41c3c2bb8c12850;hp=8cc086db422b2807f49f4700cb0a5b589570c06b;hpb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;p=project%2Fluci.git diff --git a/modules/luci-base/luasrc/view/cbi/lvalue.htm b/modules/luci-base/luasrc/view/cbi/lvalue.htm index 8cc086db4..34d02eeca 100644 --- a/modules/luci-base/luasrc/view/cbi/lvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/lvalue.htm @@ -1,18 +1,43 @@ +<% + 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%>