summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi/lvalue.htm
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-25 23:34:21 +0000
committerSteven Barth <steven@midlink.org>2008-03-25 23:34:21 +0000
commit5f9910566de7165f4bb0ee62bc3ace53c708a94e (patch)
treeda06cbacc22d9d74b1e160e6dcf19fe0f62fa432 /src/ffluci/view/cbi/lvalue.htm
parent9fa7e0e92ddae9ff68f50ad20bbdfc8a3c09135a (diff)
* Entering Version 0.2
* Completed CBI * Minor bugfixes and enhancements
Diffstat (limited to 'src/ffluci/view/cbi/lvalue.htm')
-rw-r--r--src/ffluci/view/cbi/lvalue.htm26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm
index 739d675c4..abe508017 100644
--- a/src/ffluci/view/cbi/lvalue.htm
+++ b/src/ffluci/view/cbi/lvalue.htm
@@ -1,11 +1,23 @@
- <div class="cbi-lvalue">
- <div class="cbi-lvalue-title"><%=self.title%></div>
- <div class="cbi-lvalue-field">
- <select name="cbid.<%=self.config.."."..self.section.."."..self.option%>"<% if self.size then %> size="<%=self.size%>"<% end %>>
-<%for k, v in pairs(self.list) do%>
- <option<% if self:ucivalue() == k then %> selected="selected"<% end %> value="<%=k%>"><%=v%></option>
+ <div class="cbi-value">
+ <div class="left">
+ <div class="cbi-value-title"><%=self.title%></div>
+ <div class="cbi-value-description"><%=self.description%></div>
+ </div>
+ <div class="cbi-value-field">
+<% if self.widget == "select" then %>
+ <select name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self.size then %> size="<%=self.size%>"<% end %>>
+<%for i, key in pairs(self.keylist) do%>
+ <option<% if self:ucivalue(section) == key then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
<% end %>
</select>
+<% elseif self.widget == "radio" then
+ local c = 0;
+ for i, key in pairs(self.keylist) do
+ c = c + 1%>
+ <%=self.vallist[i]%><input type="radio" name="cbid.<%=self.config.."."..section.."."..self.option%>"<% if self:ucivalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
+<% if c == self.size then c = 0 %><br />
+<% end end %>
+<% end %>
</div>
- <div class="cbi-lvalue-description"><%=self.description%></div>
+ <div class="clear"></div>
</div> \ No newline at end of file