From: Jo-Philipp Wich Date: Fri, 10 Oct 2008 11:47:32 +0000 (+0000) Subject: * luci/libs/cbi: implement addremove_template X-Git-Tag: 0.9.0~1124 X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=bfb5a53c45453fd59d5ee3eb7d370a27d6ee9147;p=project%2Fluci.git * luci/libs/cbi: implement addremove_template --- diff --git a/libs/cbi/luasrc/view/cbi/nsection.htm b/libs/cbi/luasrc/view/cbi/nsection.htm index 156137eeb..d766464bd 100644 --- a/libs/cbi/luasrc/view/cbi/nsection.htm +++ b/libs/cbi/luasrc/view/cbi/nsection.htm @@ -32,6 +32,7 @@ $Id$
<% elseif self.addremove then %> + <% if self.template_addremove then include(self.template_addremove) else -%>
<% if self.title and #self.title > 0 then -%> <%=self.title%> @@ -39,5 +40,6 @@ $Id$
<%=self.description%>
+ <%- end %> <% end %> diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm index b0da0813d..af62c53ba 100644 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ b/libs/cbi/luasrc/view/cbi/tblsection.htm @@ -107,18 +107,20 @@ end <% end %> <%- if self.addremove then -%> -
- <% if self.anonymous then %> - - <% else %> - <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then -%> -
<%:cbi_invalid%>
- <%- end %> - <% end %> -
+ <% if self.template_addremove then include(self.template_addremove) else -%> +
+ <% if self.anonymous then %> + + <% else %> + <% if self.invalid_cts then -%>
<% end %> + + + <% if self.invalid_cts then -%> +
<%:cbi_invalid%>
+ <%- end %> + <% end %> +
+ <%- end %> <%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/tsection.htm b/libs/cbi/luasrc/view/cbi/tsection.htm index 70c44aaf6..db723f92a 100644 --- a/libs/cbi/luasrc/view/cbi/tsection.htm +++ b/libs/cbi/luasrc/view/cbi/tsection.htm @@ -41,6 +41,7 @@ $Id$ <%- end %> <% if self.addremove then -%> + <% if self.template_addremove then include(self.template_addremove) else -%>
<% if self.anonymous then -%> @@ -53,5 +54,6 @@ $Id$ <%- end %> <%- end %>
+ <%- end %> <%- end %>