* luci/libs/cbi: fix <label> assignment for checkbox-based mvalues
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 15 Jul 2008 15:59:46 +0000 (15:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 15 Jul 2008 15:59:46 +0000 (15:59 +0000)
libs/cbi/luasrc/view/cbi/mvalue.htm

index a125ccf..9580d87 100644 (file)
@@ -26,9 +26,9 @@ local v = self:valuelist(section)
        local c = 0;
        for i, key in pairs(self.keylist) do
        c = c + 1%>
-                                                               <input type="checkbox" id="cbid.<%=self.config.."."..section.."."..self.option%>" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
-                                                               <label for="cbid.<%=self.config.."."..section.."."..self.option%>"><%=self.vallist[i]%></label><br />
+                                                               <input type="checkbox" id="cbid.<%=self.config.."."..section.."."..self.option.."."..i%>" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
+                                                               <label for="cbid.<%=self.config.."."..section.."."..self.option.."."..i%>"><%=self.vallist[i]%></label><br />
 <% if c == self.size then c = 0 %><br />
 <% end end %>
 <% end %>
-<%+cbi/valuefooter%>
\ No newline at end of file
+<%+cbi/valuefooter%>