From 7dd03fda8d247a2c5b91b1a95d0d5e38b248803c Mon Sep 17 00:00:00 2001 From: str4d <str4d@mail.i2p> Date: Wed, 1 Feb 2012 03:48:39 +0000 Subject: [PATCH] Added a Previous page button At present the ?page= in the URL isn't affected, which could possibly confuse users - maybe move to having the page variable as a POST variable so the url is just always /i2ptunnel/wizard --- apps/i2ptunnel/jsp/wizard.jsp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp index c7852a11b7..150a961041 100644 --- a/apps/i2ptunnel/jsp/wizard.jsp +++ b/apps/i2ptunnel/jsp/wizard.jsp @@ -19,6 +19,12 @@ curPage = 1; } } + if ("Previous page".equals(request.getParameter("action") { + curPage = curPage - 2; + if (curPage <= 0) { + curPage = 1; + } + } boolean tunnelIsClient = Boolean.valueOf(request.getParameter("isClient")); String tunnelType = request.getParameter("type"); %> @@ -316,6 +322,9 @@ http://i2jump.i2p/" /><% <div class="footer"> <div class=toolbox"> <button id="controlCancel" class="control" type="submit" name="action" value="" title="Cancel"><%=intl._("Cancel")%></button> + <% if (curPage != 1) { + %><button id="controlPrevious" accesskey="P" class="control" type="submit" name="action" value="Previous page" title="Previous Page"><%=intl._("Previous")%>(<span class="accessKey">P</span>)</button><% + } %> <% if (curPage == 7) { %><button id="controlFinish" accesskey="F" class="control" type="submit" name="action" value="Save changes" title="Finish Wizard"><%=intl._("Finish")%>(<span class="accessKey">F</span>)</button><% } else { -- GitLab