summaryrefslogtreecommitdiffhomepage
path: root/web/src/view/cbi/lvalue.htm
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/view/cbi/lvalue.htm')
-rw-r--r--web/src/view/cbi/lvalue.htm16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/src/view/cbi/lvalue.htm b/web/src/view/cbi/lvalue.htm
new file mode 100644
index 0000000000..f1ae5a0939
--- /dev/null
+++ b/web/src/view/cbi/lvalue.htm
@@ -0,0 +1,16 @@
+<%+cbi/valueheader%>
+<% if self.widget == "select" then %>
+ <select onchange="cbi_d_update(this.id)" id="cbid.<%=self.config.."."..section.."."..self.option%>" 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 %>
+<%+cbi/valuefooter%> \ No newline at end of file