libs/web: add "back to overview" button to page actions if .redirect is set on the...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 21 Nov 2010 00:21:49 +0000 (00:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 21 Nov 2010 00:21:49 +0000 (00:21 +0000)
libs/web/luasrc/view/cbi/footer.htm

index fe5b6881c22aed8a34aa7e10ff68651a95c67947..eb79f2419bd9b44eb00981d71362f97cc42491ad 100644 (file)
@@ -14,14 +14,21 @@ $Id$
 -%>
        <%- if pageaction then -%>
        <div class="cbi-page-actions">
+               <% if redirect then %>
+               <div style="float:left">
+                       <input class="cbi-button cbi-button-link" type="button" value="<%:Back to Overview%>" onclick="location.href='<%=pcdata(redirect)%>'" />
+               </div>
+               <% end %>
+
                <% if flow.skip then %>
                        <input class="cbi-button cbi-button-skip" type="submit" name="cbi.skip" value="<%:Skip%>" />
                <% end %>
-               <% if not autoapply then%>
+               <% if not autoapply then %>
                        <input class="cbi-button cbi-button-apply" type="submit" name="cbi.apply" value="<%:Save & Apply%>" />
                <% end %>
                <input class="cbi-button cbi-button-save" type="submit" value="<%:Save%>" />
                <input class="cbi-button cbi-button-reset" type="reset" value="<%:Reset%>" />
+
                <script type="text/javascript">cbi_d_update();</script>
        </div>
        <%- end -%>