From 627191c7010a6f774591bef39e5814890d1c5383 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 24 Jun 2013 12:00:20 +0000 Subject: [PATCH] libs/web: support dependencies on mvalues --- libs/web/htdocs/luci-static/resources/cbi.js | 2 +- libs/web/luasrc/view/cbi/mvalue.htm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/web/htdocs/luci-static/resources/cbi.js b/libs/web/htdocs/luci-static/resources/cbi.js index a30533bda7..e89658dc96 100644 --- a/libs/web/htdocs/luci-static/resources/cbi.js +++ b/libs/web/htdocs/luci-static/resources/cbi.js @@ -335,7 +335,7 @@ function cbi_d_checkvalue(target, ref) { if (!t) { var tl = document.getElementsByName(target); - if( tl.length > 0 && tl[0].type == 'radio' ) + if( tl.length > 0 && (tl[0].type == 'radio' || tl[0].type == 'checkbox')) for( var i = 0; i < tl.length; i++ ) if( tl[i].checked ) { value = tl[i].value; diff --git a/libs/web/luasrc/view/cbi/mvalue.htm b/libs/web/luasrc/view/cbi/mvalue.htm index 8b1afde943..6a0b3881d0 100644 --- a/libs/web/luasrc/view/cbi/mvalue.htm +++ b/libs/web/luasrc/view/cbi/mvalue.htm @@ -1,7 +1,7 @@ <% local v = self:valuelist(section) or {} -%> <%+cbi/valueheader%> <% if self.widget == "select" then %> - > <% for i, key in pairs(self.keylist) do -%> ><%=striptags(self.vallist[i])%> <%- end %> @@ -11,7 +11,7 @@ for i, key in pairs(self.keylist) do c = c + 1 %> - /> + /> ><%=self.vallist[i]%>
<% if c == self.size then c = 0 %>
<% end end %> -- 2.30.2