From: Jo-Philipp Wich Date: Mon, 9 Nov 2009 00:33:45 +0000 (+0000) Subject: libs/cbi: auto-hide apply messages and make title and description optional for Map... X-Git-Tag: 0.10.0~974 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6965f4ac2b57ef397b65cd30c9a1b7f14daea980;p=oweals%2Fluci.git libs/cbi: auto-hide apply messages and make title and description optional for Map and SimpleForm instances --- 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() %>