summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-06 11:24:26 +0000
committerSteven Barth <steven@midlink.org>2008-07-06 11:24:26 +0000
commit0fac92606553ab4317dd744ef980b15185fb024a (patch)
tree183aedb54df77d309ebd4746b5534d1cc372f6a3 /libs
parent6e2fe3af63223e29b511e7fe4a68e5884476ad6f (diff)
libs/cbi: Fixed rendering of checkbox and radiobox-based widgets
Diffstat (limited to 'libs')
-rw-r--r--libs/cbi/luasrc/view/cbi/lvalue.htm3
-rw-r--r--libs/cbi/luasrc/view/cbi/mvalue.htm3
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm
index f1ae5a0939..95e477d235 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]%><input type="radio" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
+ <input type="radio" id="cbid.<%=self.config.."."..section.."."..self.option%>" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
+ <label for="cbid.<%=self.config.."."..section.."."..self.option%>"><%=self.vallist[i]%></label><br />
<% if c == self.size then c = 0 %><br />
<% end end %>
<% end %>
diff --git a/libs/cbi/luasrc/view/cbi/mvalue.htm b/libs/cbi/luasrc/view/cbi/mvalue.htm
index bed66e569a..dcbf782ca1 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]%><input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>[]"<% if luci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
+ <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 />
<% if c == self.size then c = 0 %><br />
<% end end %>
<% end %>