diff options
Diffstat (limited to 'modules/luci-base/luasrc/view/footer.htm')
-rw-r--r-- | modules/luci-base/luasrc/view/footer.htm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/view/footer.htm b/modules/luci-base/luasrc/view/footer.htm index f3574b6b10..1667d3aa9a 100644 --- a/modules/luci-base/luasrc/view/footer.htm +++ b/modules/luci-base/luasrc/view/footer.htm @@ -4,4 +4,27 @@ Licensed to the public under the Apache License 2.0. -%> -<% include("themes/" .. theme .. "/footer") %>
\ No newline at end of file +<% + local is_rollback_pending, rollback_time_remaining, rollback_session, rollback_token = luci.model.uci:rollback_pending() + + if is_rollback_pending or trigger_apply or trigger_revert then + include("cbi/apply_widget") + cbi_apply_widget(redirect, rollback_token) +%> + <div class="alert-message" id="cbi_apply_status" style="display:none"></div> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + <% if trigger_apply then -%> + uci_apply(true); + <%- elseif trigger_revert then -%> + uci_revert(); + <%- else -%> + uci_confirm(true, Date.now() + <%=rollback_time_remaining%> * 1000); + <%- end %> + }); + </script> +<% + end + + include("themes/" .. theme .. "/footer") +%> |