summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi/lvalue.htm
blob: f2a5ff975089ab4894bdb976aaae91ef0bb75c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
						<div class="cbi-value">
							<div class="cbi-value-title left"><%=self.title%></div>
							<div class="cbi-value-description right"><%=self.description%></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:cfgvalue(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:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" />
<% if c == self.size then c = 0 %><br />
<% end end %>
<% end %>
							</div>
							<div class="clear"></div>
						</div>