modules/admin-full: only display back button in changes page if a redir url is given
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jun 2011 20:47:00 +0000 (20:47 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jun 2011 20:47:00 +0000 (20:47 +0000)
modules/admin-full/luasrc/view/admin_uci/changes.htm

index c26d8cc5b84bc4db77a09ae285024368b8bd32a5..159a7b5f0a9a19d9ea7401b5cb9070435d31b401 100644 (file)
@@ -25,11 +25,13 @@ $Id$
 <% end %>
 
 <div class="cbi-page-actions">
+       <% local r = luci.http.formvalue("redir"); if r and #r > 0 then %>
        <div style="float:left">
-               <form class="inline" method="get" action="<%=luci.util.pcdata(luci.http.formvalue("redir"))%>">
+               <form class="inline" method="get" action="<%=luci.util.pcdata(r)%>">
                        <input class="cbi-button cbi-button-link" style="float:left; margin:0" type="submit" value="<%:Back%>" />
                </form>
        </div>
+       <% end %>
 
        <div style="text-align:right">
                <form class="inline" method="get" action="<%=controller%>/admin/uci/apply">