From: Steven Barth Date: Sun, 6 Jul 2008 11:24:26 +0000 (+0000) Subject: libs/cbi: Fixed rendering of checkbox and radiobox-based widgets X-Git-Tag: 0.8.0~704 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=0fac92606553ab4317dd744ef980b15185fb024a libs/cbi: Fixed rendering of checkbox and radiobox-based widgets --- diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm index f1ae5a093..95e477d23 100644 --- a/libs/cbi/luasrc/view/cbi/lvalue.htm +++ b/libs/cbi/luasrc/view/cbi/lvalue.htm @@ -9,7 +9,8 @@ local c = 0; for i, key in pairs(self.keylist) do c = c + 1%> - <%=self.vallist[i]%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" /> + " name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" /> +
<% if c == self.size then c = 0 %>
<% end end %> <% end %> diff --git a/libs/cbi/luasrc/view/cbi/mvalue.htm b/libs/cbi/luasrc/view/cbi/mvalue.htm index bed66e569..dcbf782ca 100644 --- a/libs/cbi/luasrc/view/cbi/mvalue.htm +++ b/libs/cbi/luasrc/view/cbi/mvalue.htm @@ -12,7 +12,8 @@ local v = self:valuelist(section) local c = 0; for i, key in pairs(self.keylist) do c = c + 1%> - <%=self.vallist[i]%>[]"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" /> + " name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" /> +
<% if c == self.size then c = 0 %>
<% end end %> <% end %>