* CBI update
[project/luci.git] / src / ffluci / view / cbi / nsection.htm
1 <% if self:cfgvalue(self.section) then %>
2 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
3 <h2><%=self.title%></h2>
4 <div class="cbi-section-descr"><%=self.description%></div>
5 <fieldset class="cbi-section-node">
6 <% self:render_children(self.section) %>
7 <% if #self.optionals[self.section] > 0 or self.dynamic then %>
8 <div class="cbi-optionals">
9 <% if self.dynamic then %>
10 <input type="text" name="cbi.opt.<%=self.config%>.<%=self.section%>" />
11 <% else %>
12 <select name="cbi.opt.<%=self.config%>.<%=self.section%>">
13 <option><%:cbi_selopt *** Zusätzliche Parameter ***%></option>
14 <% for key, val in pairs(self.optionals[self.section]) do %>
15 <option value="<%=val.option%>"><%=val.title%></option>
16 <% end %>
17 </select>
18 <% end %>
19 <input type="submit" value="<%:cbi_addopt Feld hinzufügen%>" />
20 </div>
21 <% end %>
22 <br />
23 <% if self.addremove then %>
24 <input type="submit" name="cbi.rns.<%=self.config%>.<%=self.section%>" value="<%:cbi_del Eintrag entfernen%>" />
25 <% end %>
26 </fieldset>
27 </div>
28 <% elseif self.addremove then %>
29 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
30 <h2><%=self.title%></h2>
31 <div class="cbi-section-descr"><%=self.description%></div>
32 <input type="submit" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:cbi_cns Eintrag anlegen%>" />
33 </div>
34 <% end %>