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)%>" data-update=
"change" 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 '<%=url('admin/filebrowser')%
>',
20 '<%=self.default_path and self.default_path%
>'
21 <%- if #self.keylist
> 0 then -%
>, [{
22 <%- for i, k in ipairs(self.keylist) do -%
>
23 <%-=string.format(
"%q", k) ..
":" .. string.format(
"%q", self.vallist[i])-%
>
24 <%-if i<#self.keylist then-%
>,<%-end-%
>
26 }, '<%: -- custom -- %
>']<% end -%
>);