diff options
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi/map.htm')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/map.htm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/map.htm b/modules/luci-base/luasrc/view/cbi/map.htm index e3210add63..83c3cb2170 100644 --- a/modules/luci-base/luasrc/view/cbi/map.htm +++ b/modules/luci-base/luasrc/view/cbi/map.htm @@ -1,13 +1,24 @@ <%- if firstmap and messages then local msg; for _, msg in ipairs(messages) do -%> - <div class="errorbox"><%=pcdata(msg)%></div> + <div class="alert-message warning"><%=pcdata(msg)%></div> <%- end end -%> -<%-+cbi/apply_xhr-%> - <div class="cbi-map" id="cbi-<%=self.config%>"> <% if self.title and #self.title > 0 then %><h2 name="content"><%=self.title%></h2><% end %> <% if self.description and #self.description > 0 then %><div class="cbi-map-descr"><%=self.description%></div><% end %> - <%- if firstmap and applymap then cbi_apply_xhr(self.config, parsechain, redirect) end -%> + <%- if firstmap and (applymap or confirmmap) then -%> + <%+cbi/apply_widget%> + <% cbi_apply_widget(redirect) %> + <div class="alert-message" id="cbi_apply_status" style="display:none"></div> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + <% if confirmmap then -%> + uci_confirm(true, Date.now() + <%=confirmmap%> * 1000); + <%- else -%> + uci_apply(true); + <%- end %> + }); + </script> + <%- end -%> <% if self.tabbed then %> <ul class="cbi-tabmenu map"> @@ -20,7 +31,6 @@ </li> <% end %> </ul> - <br /> <% for i, section in ipairs(self.children) do %> <div class="cbi-tabcontainer" id="container.m-<%=self.config%>.<%=section.section or section.sectiontype%>"<% if section.sectiontype ~= self.selected_tab then %> style="display:none"<% end %>> <% section:render() %> @@ -42,6 +52,4 @@ <% else %> <%- self:render_children() %> <% end %> - - <br /> </div> |