4 local vals = self:cfgvalue(section) or {}
7 if (val and #val
> 0) or (i ==
1) then
9 <input class=
"cbi-input-text" value=
"<%=pcdata(val)%>" onchange=
"cbi_d_update(this.id)" type=
"text"<%=
10 attr(
"id", cbid ..
"." .. i) .. attr(
"name", cbid) .. ifattr(self.size,
"size") ..
11 ifattr(i ==
1 and self.placeholder,
"placeholder", self.placeholder)
15 <script type=
"text/javascript">
17 '<%=cbid%
>', '<%=resource%
>', '<%=self.datatype%
>',
18 <%=tostring(self.optional or self.rmempty)%
>
19 <%- if #self.keylist
> 0 then -%
>, [{
20 <%- for i, k in ipairs(self.keylist) do -%
>
21 <%-=string.format(
"%q", k) ..
":" .. string.format(
"%q", self.vallist[i])-%
>
22 <%-if i<#self.keylist then-%
>,<%-end-%
>
24 }, '<%: -- custom -- %
>']<% end -%
>);