2 LuCI - Lua Configuration Interface
3 Copyright
2008 Steven Barth
<steven@midlink.org
>
4 Copyright
2008 Jo-Philipp Wich
<xm@leipzig.freifunk.net
>
6 Licensed under the Apache License, Version
2.0 (the
"License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-
2.0
17 local vals = self:cfgvalue(section) or {}
21 <input class=
"cbi-input-text" value=
"<%=val%>" onchange=
"cbi_d_update(this.id)" type=
"text"<%= attr(
"id", cbid ..
"." .. i) .. attr(
"name", cbid) .. ifattr(self.size,
"size")%
> />
22 <% if i <= #vals then %
>
23 <input class=
"cbi-input-image" type=
"image" value=
"<%:cbi_del%>" name=
"cbi.rle.<%=section .. ".
" .. self.option .. ".
" .. i%>" alt=
"<%:cbi_del%>" title=
"<%:cbi_del%>" src=
"<%=resource%>/cbi/remove.gif" />
25 <input class=
"cbi-input-image" type=
"image" value=
"<%:cbi_add%>" name=
"cbi.ale.<%=section .. ".
" .. self.option%>" alt=
"<%:cbi_add%>" title=
"<%:cbi_add%>" src=
"<%=resource%>/cbi/add.gif" />
27 <% if #self.keylist
> 0 then -%
>
28 <script type=
"text/javascript">
29 cbi_combobox_init('<%=cbid ..
"." .. i%
>', {
31 for i, k in ipairs(self.keylist) do
33 <%-=string.format(
"%q", k) ..
":" .. string.format(
"%q", self.vallist[i])-%
>
34 <%-if i<#self.keylist then-%
>,<%-end-%
>
38 }, '<%- if not self.rmempty and not self.optional then -%
>
40 <%- end -%
>', '<%:cbi_manual%
>');
43 <% if i <= #vals then %
><br />