luci-base: support hiding the "Back to Overview" button in cbi maps
[project/luci.git] / modules / luci-base / luasrc / view / cbi / dynlist.htm
1 <%+cbi/valueheader%>
2 <div<%=
3         attr("data-prefix", cbid) ..
4         attr("data-browser-path", self.default_path) ..
5         attr("data-dynlist", luci.util.serialize_json({
6                 self.keylist, self.vallist,
7                 self.datatype, self.optional or self.rmempty
8         })) ..
9
10         ifattr(self.size, "data-size", self.size) ..
11         ifattr(self.placeholder, "data-placeholder", self.placeholder)
12 %>>
13 <%
14         local vals = self:cfgvalue(section) or {}
15         for i=1, #vals + 1 do
16                 local val = vals[i]
17                 if (val and #val > 0) or (i == 1) then
18 %>
19         <input class="cbi-input-text" value="<%=pcdata(val)%>" data-update="change" type="text"<%=
20                 attr("id", cbid .. "." .. i) ..
21                 attr("name", cbid) ..
22                 ifattr(self.size, "size") ..
23                 ifattr(i == 1 and self.placeholder, "placeholder", self.placeholder)
24         %> /><br />
25 <% end end %>
26 </div>
27 <%+cbi/valuefooter%>