15272f05f6ed22523b7232c6a50b4f30bcf0d01d
[project/luci.git] / src / ffluci / view / cbi / tsection.htm
1 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
2 <h2><%=self.title%></h2>
3 <div class="cbi-section-descr"><%=self.description%></div>
4 <% for k, v in pairs(self:cfgsections()) do%>
5 <% if self.addremove then %><div class="cbi-section-remove right">
6 <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="<%:cbi_del Eintrag entfernen%>" />
7 </div><% end %>
8 <% if not self.anonymous then %><h3><%=k%></h3><% end %>
9 <fieldset class="cbi-section-node" id="cbi-<%=self.config%>-<%=k%>">
10 <% self:render_children(k) %>
11 <% if #self.optionals[k] > 0 or self.dynamic then %>
12 <div class="cbi-optionals">
13 <% if self.dynamic then %>
14 <input type="text" name="cbi.opt.<%=self.config%>.<%=k%>" />
15 <% else %>
16 <select name="cbi.opt.<%=self.config%>.<%=k%>">
17 <option><%:cbi_addopt -- Feld --%></option>
18 <% for key, val in pairs(self.optionals[k]) do %>
19 <option id="cbi-<%=self.config.."-"..k.."-"..val.option%>" value="<%=val.option%>"><%=val.title%></option>
20 <% if #val.deps > 0 then %><script type="text/javascript">
21 <% for j, d in ipairs(val.deps) do %>cbi_d_add("cbi-<%=self.config.."-"..k.."-"..val.option%>", "cbid.<%=self.config.."."..k.."."..d.field%>", "<%=d.value%>");
22 <% end %>
23 </script><% end %>
24 <% end %>
25 </select>
26 <% end %>
27 <input type="submit" value="<%:add hinzufügen%>" />
28 </div>
29 <% end %>
30 </fieldset>
31 <br />
32 <% end %>
33 <% if self.addremove then %>
34 <div class="cbi-section-create">
35 <% if self.anonymous then %>
36 <input type="submit" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:cbi_add Eintrag hinzufügen%>" />
37 <% else %><input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
38 <input type="submit" value="<%:cbi_add Eintrag hinzufügen%>" />
39 <% end %><% if self.err_invalid then %><div class="cbi-error"><%:cbi_invalid Fehler: Ungültige Eingabe%></div><% end %>
40 </div>
41 <% end %>
42 </div>