From 6965f4ac2b57ef397b65cd30c9a1b7f14daea980 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 9 Nov 2009 00:33:45 +0000 Subject: [PATCH] libs/cbi: auto-hide apply messages and make title and description optional for Map and SimpleForm instances --- libs/cbi/luasrc/view/cbi/map.htm | 12 +++++++++--- libs/cbi/luasrc/view/cbi/simpleform.htm | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libs/cbi/luasrc/view/cbi/map.htm b/libs/cbi/luasrc/view/cbi/map.htm index 861656894..6b6f3e43b 100644 --- a/libs/cbi/luasrc/view/cbi/map.htm +++ b/libs/cbi/luasrc/view/cbi/map.htm @@ -14,10 +14,10 @@ $Id$ -%>
-

<%=self.title%>

-
<%=self.description%>
+ <% if self.title and #self.title > 0 then %>

<%=self.title%>

<% end %> + <% if self.description and #self.description > 0 then %>
<%=self.description%>
<% end %> <%- if self._apply then -%> -
+
<%:Applying changes%>
    <%- local fp = self._apply() @@ -30,6 +30,12 @@ $Id$ fp:close() -%>
+ <%- end -%> <%- self:render_children() %>
diff --git a/libs/cbi/luasrc/view/cbi/simpleform.htm b/libs/cbi/luasrc/view/cbi/simpleform.htm index a0bb0f02b..9c40f8290 100644 --- a/libs/cbi/luasrc/view/cbi/simpleform.htm +++ b/libs/cbi/luasrc/view/cbi/simpleform.htm @@ -20,8 +20,8 @@ $Id$
<% end %>
-

<%=self.title%>

-
<%=self.description%>
+ <% if self.title and #self.title > 0 then %>

<%=self.title%>

<% end %> + <% if self.description and #self.description > 0 then %>
<%=self.description%>
<% end %> <% self:render_children() %>
-- 2.25.1