luci-theme-bootstrap: add redir parameter to uci change menu
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 6 Oct 2015 20:21:48 +0000 (22:21 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 6 Oct 2015 20:21:48 +0000 (22:21 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm

index f4a6810090c444350fa21d9a1cdcb8b8bb16d8ba..3b40ad4380e5eb27b0cb77218bc5ac973c538c83 100644 (file)
        %>
        <div class="pull-right">
        <% if ucichanges > 0 then %>
-         <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><%:Unsaved Changes%>: <%=ucichanges%></a>
+         <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><%:Unsaved Changes%>: <%=ucichanges%></a>
        <% end %>
       <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
        <span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span>