luci-base: mvalue: fix column wrapping
authorJo-Philipp Wich <jo@mein.io>
Wed, 25 Jan 2017 23:07:26 +0000 (00:07 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 25 Jan 2017 23:07:26 +0000 (00:07 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/view/cbi/mvalue.htm

index 246ef43aad1c93b1b510808ed63fe8f4631a6c40..db17450d27f09409b2a239153aad46dbcaa71fc0 100644 (file)
@@ -36,7 +36,7 @@
                                <label<%= attr("for", cbid.."-"..key)%>></label>
                                <%=pcdata(self.vallist[i])%>
                        </label>
-                       <% if i == self.size then write('<br />') end %>
+                       <% if self.size and (i % self.size) == 0 then write('<br />') end %>
                <% end %>
        </div>
 <% end %>