add some indirection around make targets of module.mk, so you can combine it more...
[project/luci.git] / libs / cbi / 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 %>