From bfb5a53c45453fd59d5ee3eb7d370a27d6ee9147 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 10 Oct 2008 11:47:32 +0000 Subject: [PATCH] * luci/libs/cbi: implement addremove_template --- libs/cbi/luasrc/view/cbi/nsection.htm | 2 ++ libs/cbi/luasrc/view/cbi/tblsection.htm | 26 +++++++++++++------------ libs/cbi/luasrc/view/cbi/tsection.htm | 2 ++ 3 files changed, 18 insertions(+), 12 deletions(-) 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 %> -- 2.25.1