* 3rd Package reorgnaisation
[project/luci.git] / libs / cbi / src / view / cbi / ucisection.htm
diff --git a/libs/cbi/src/view/cbi/ucisection.htm b/libs/cbi/src/view/cbi/ucisection.htm
new file mode 100644 (file)
index 0000000..0abc37e
--- /dev/null
@@ -0,0 +1,20 @@
+<% self:render_children(section, scope or {}) %>
+                                               <% if #self.optionals[section] > 0 or self.dynamic then %>
+                                                       <div class="cbi-optionals">
+                                                       <% if self.dynamic then %>
+                                                               <input type="text" name="cbi.opt.<%=self.config%>.<%=section%>" />
+                                                       <% else %>
+                                                               <select name="cbi.opt.<%=self.config%>.<%=section%>">
+                                                                       <option><%:cbi_addopt -- Feld --%></option>
+                                                               <% for key, val in pairs(self.optionals[section]) do %>
+                                                                       <option id="cbi-<%=self.config.."-"..section.."-"..val.option%>" value="<%=val.option%>"><%=val.title%></option>
+                                                               <% end %>
+                                                               </select>
+                                                               <script type="text/javascript"><% for key, val in pairs(self.optionals[section]) do %>
+                                                                       <% 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%>");
+                                                               <% end %><% end %>
+                                                               <% end %></script>
+                                                       <% end %>
+                                                               <input type="submit" value="<%:add hinzufügen%>" />
+                                                       </div>
+                                               <% end %>
\ No newline at end of file