summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/view/cbi/mvalue.htm
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffluci/view/cbi/mvalue.htm')
-rw-r--r--src/ffluci/view/cbi/mvalue.htm26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ffluci/view/cbi/mvalue.htm b/src/ffluci/view/cbi/mvalue.htm
new file mode 100644
index 000000000..de7bd0c61
--- /dev/null
+++ b/src/ffluci/view/cbi/mvalue.htm
@@ -0,0 +1,26 @@
+<%
+local v = self:valuelist(section)
+%>
+ <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 multiple="multiple" 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 ffluci.util.contains(v, key) then %> selected="selected"<% end %> value="<%=key%>"><%=self.vallist[i]%></option>
+<% end %>
+ </select>
+<% elseif self.widget == "checkbox" then
+ local c = 0;
+ for i, key in pairs(self.keylist) do
+ c = c + 1%>
+ <%=self.vallist[i]%><input type="checkbox" name="cbid.<%=self.config.."."..section.."."..self.option%>[]"<% if ffluci.util.contains(v, key) then %> checked="checked"<% end %> value="<%=key%>" />
+<% if c == self.size then c = 0 %><br />
+<% end end %>
+<% end %>
+ </div>
+ <div class="clear"></div>
+ </div> \ No newline at end of file