luci-base, luci-app-firewall: port custom rules to client side view
[project/luci.git] / modules / luci-base / luasrc / view / cbi / nsection.htm
1 <% if self:cfgvalue(self.section) then section = self.section %>
2 <div class="cbi-section">
3 <% if self.title and #self.title > 0 then -%>
4 <legend><%=self.title%></legend>
5 <%- end %>
6 <% if self.description and #self.description > 0 then -%>
7 <div class="cbi-section-descr"><%=self.description%></div>
8 <%- end %>
9 <% if self.addremove then -%>
10 <div class="cbi-section-remove right">
11 <input type="submit" class="cbi-button" name="cbi.rns.<%=self.config%>.<%=section%>" value="<%:Delete%>" />
12 </div>
13 <%- end %>
14 <div class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>">
15 <%+cbi/ucisection%>
16 </div>
17 </div>
18 <% elseif self.addremove then %>
19 <% if self.template_addremove then include(self.template_addremove) else -%>
20 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
21 <% if self.title and #self.title > 0 then -%>
22 <legend><%=self.title%></legend>
23 <%- end %>
24 <div class="cbi-section-descr"><%=self.description%></div>
25 <input type="submit" class="cbi-button cbi-button-add" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:Add%>" />
26 </div>
27 <%- end %>
28 <% end %>
29 <!-- /nsection -->