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

index 05d9419a80c70207e5c27494147db6737c38e492..3e3c60729b04ff5e4f39b1feb80dea8042dffc5b 100755 (executable)
                        end
                        %>
                        <% if ucichanges > 0 then %>
-                       <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=ucichanges%></a>
+                       <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=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"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>