80dcefc07cb0f2a3c668a178b55496918293db21
[project/luci.git] / src / ffluci / view / cbi / nsection.htm
1 <% if self:ucivalue(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 > 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 Felder ***%></option>
14                                                         <% for key, val in pairs(self.optionals) 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 %>