From 7fd1bb58313bf63e383a422ba3336715b496e49f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 22 Jan 2013 11:52:27 +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