diff options
author | Steven Barth <steven@midlink.org> | 2008-05-27 08:14:24 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-27 08:14:24 +0000 |
commit | b8124f18f88fe11158eb122a1e362cfbd512cf4f (patch) | |
tree | 2d7e9044ddb656c83de73415240c4ded59622389 /web/src/view/cbi/mvalue.htm | |
parent | d4399bf6189977336a94795f25986fb89a22a5e7 (diff) |
* Separated the MVC-Webframework from core
* Separated i18n from core to prepare translations
Diffstat (limited to 'web/src/view/cbi/mvalue.htm')
-rw-r--r-- | web/src/view/cbi/mvalue.htm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web/src/view/cbi/mvalue.htm b/web/src/view/cbi/mvalue.htm new file mode 100644 index 000000000..bed66e569 --- /dev/null +++ b/web/src/view/cbi/mvalue.htm @@ -0,0 +1,19 @@ +<% +local v = self:valuelist(section) +%> +<%+cbi/valueheader%> +<% 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 luci.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 luci.util.contains(v, 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 |