footer.htm 798 B

123456789101112131415161718192021222324252627
  1. <%#
  2. Copyright 2008 Steven Barth <steven@midlink.org>
  3. Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
  4. Licensed to the public under the Apache License 2.0.
  5. -%>
  6. <%
  7. local is_rollback_pending, rollback_time_remaining, rollback_session, rollback_token = luci.model.uci:rollback_pending()
  8. if is_rollback_pending or trigger_apply or trigger_revert then
  9. %>
  10. <script type="text/javascript">
  11. document.addEventListener("luci-loaded", function() {
  12. <% if trigger_apply then -%>
  13. L.ui.changes.apply(true);
  14. <%- elseif trigger_revert then -%>
  15. L.ui.changes.revert();
  16. <%- else -%>
  17. L.ui.changes.confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000, <%=luci.http.write_json(rollback_token)%>);
  18. <%- end %>
  19. });
  20. </script>
  21. <%
  22. end
  23. include("themes/" .. theme .. "/footer")
  24. %>