diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-20 18:08:18 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-20 18:08:18 +0000 |
commit | ff58e81d18a23fcbdfea89044b0600bcdd2d06da (patch) | |
tree | 3d8ffee134f250a656c4afe6cec9f6d760299abf /libs/web/luasrc/view | |
parent | aa0f710867cc4333df4efa3fdb45ae2ed51e9c50 (diff) |
libs/web: skip empty values in DynList widget
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r-- | libs/web/luasrc/view/cbi/dynlist.htm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/web/luasrc/view/cbi/dynlist.htm b/libs/web/luasrc/view/cbi/dynlist.htm index 5f57941b80..90f3f1e905 100644 --- a/libs/web/luasrc/view/cbi/dynlist.htm +++ b/libs/web/luasrc/view/cbi/dynlist.htm @@ -18,12 +18,13 @@ $Id$ local vals = self:cfgvalue(section) or {} for i=1, #vals + 1 do local val = vals[i] + if val and #val > 0 then %> <input class="cbi-input-text" value="<%=pcdata(val)%>" onchange="cbi_d_update(this.id)" type="text"<%= attr("id", cbid .. "." .. i) .. attr("name", cbid) .. ifattr(self.size, "size") .. ifattr(i == 1 and self.placeholder, "placeholder", self.placeholder) %> /><br /> -<% end %> +<% end end %> </div> <script type="text/javascript"> cbi_dynlist_init('<%=cbid%>'); |