* core: Added template for a table view of typed sections
[project/luci.git] / core / src / view / cbi / ucisection.htm
1 <% self:render_children(section, scope or {}) %>
2 <% if #self.optionals[section] > 0 or self.dynamic then %>
3 <div class="cbi-optionals">
4 <% if self.dynamic then %>
5 <input type="text" name="cbi.opt.<%=self.config%>.<%=section%>" />
6 <% else %>
7 <select name="cbi.opt.<%=self.config%>.<%=section%>">
8 <option><%:cbi_addopt -- Feld --%></option>
9 <% for key, val in pairs(self.optionals[section]) do %>
10 <option id="cbi-<%=self.config.."-"..section.."-"..val.option%>" value="<%=val.option%>"><%=val.title%></option>
11 <% end %>
12 </select>
13 <script type="text/javascript"><% for key, val in pairs(self.optionals[section]) do %>
14 <% if #val.deps > 0 then %><% for j, d in ipairs(val.deps) do %>cbi_d_add("cbi-<%=self.config.."-"..section.."-"..val.option%>", "cbid.<%=self.config.."."..section.."."..d.field%>", "<%=d.value%>");
15 <% end %><% end %>
16 <% end %></script>
17 <% end %>
18 <input type="submit" value="<%:add hinzuf├╝gen%>" />
19 </div>
20 <% end %>