1
0

footer.htm 886 B

123456789101112131415161718192021222324252627282930
  1. <%#
  2. Copyright 2008 Steven Barth <steven@midlink.org>
  3. Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
  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. include("cbi/apply_widget")
  10. cbi_apply_widget(redirect, rollback_token)
  11. %>
  12. <div class="alert-message" id="cbi_apply_status" style="display:none"></div>
  13. <script type="text/javascript">
  14. document.addEventListener("DOMContentLoaded", function() {
  15. <% if trigger_apply then -%>
  16. uci_apply(true);
  17. <%- elseif trigger_revert then -%>
  18. uci_revert();
  19. <%- else -%>
  20. uci_confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000);
  21. <%- end %>
  22. });
  23. </script>
  24. <%
  25. end
  26. include("themes/" .. theme .. "/footer")
  27. %>