summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-10-13 23:59:50 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-10-13 23:59:50 +0000
commit5ce9bd5fc852ddacb99161fc35839c3a5fbe916d (patch)
tree82c5fdcbb6c7b5aab4b00672a4048ab6fa6aab49 /libs/cbi
parent42e1f743b394c95637b99feac7a93161c5215381 (diff)
libs/cbi: support horizontal display for radio button groups
Diffstat (limited to 'libs/cbi')
-rw-r--r--libs/cbi/luasrc/view/cbi/full_valuefooter.htm2
-rw-r--r--libs/cbi/luasrc/view/cbi/lvalue.htm2
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm
index 9fc5c13c9..bdf7d1bfd 100644
--- a/libs/cbi/luasrc/view/cbi/full_valuefooter.htm
+++ b/libs/cbi/luasrc/view/cbi/full_valuefooter.htm
@@ -14,7 +14,7 @@ $Id$
-%>
<% if self.description and #self.description > 0 then -%>
- <% if not luci.util.instanceof( self, luci.cbi.Flag ) then -%>
+ <% if not luci.util.instanceof( self, luci.cbi.Flag ) or self.orientation ~= "horizontal" then -%>
<br />
<%- end %>
<div class="cbi-value-description">
diff --git a/libs/cbi/luasrc/view/cbi/lvalue.htm b/libs/cbi/luasrc/view/cbi/lvalue.htm
index a6fd18f4f..b69934a0f 100644
--- a/libs/cbi/luasrc/view/cbi/lvalue.htm
+++ b/libs/cbi/luasrc/view/cbi/lvalue.htm
@@ -26,7 +26,7 @@ $Id$
%>
<input class="cbi-input-radio" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="radio"<%= attr("id", cbid..c) .. attr("name", cbid) .. attr("value", key) .. ifattr(self:cfgvalue(section) == key, "checked", "checked") %> />
<label<%= attr("for", cbid..c) %>><%=self.vallist[i]%></label>
-<% if c == self.size then c = 0 %><br />
+<% if c == self.size then c = 0 %><% if self.orientation == "horizontal" then %>&nbsp;<% else %><br /><% end %>
<% end end %>
<% end %>
<%+cbi/valuefooter%>