diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java index fcf45d94d36df9dda01d9996cfe706ae32c22a15..ce547cd029b10265236d35cc1639e9741ebd6807 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java @@ -142,7 +142,7 @@ public class IndexBean { } private String processAction() { - if ( (_action == null) || (_action.trim().length() <= 0) ) + if ( (_action == null) || (_action.trim().length() <= 0) || ("Cancel".equals(_action))) return ""; if ( (_prevNonce != _curNonce) && (!validPassphrase(_passphrase)) ) return "Invalid nonce, are you being spoofed?"; diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java index 7af6125d65c0e93a97bd188d04c059e5c1d821ca..b612c005b2ee0d9aaa87a58e2ba99b9089751c62 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHandler.java @@ -41,6 +41,18 @@ public class ConfigClientsHandler extends FormHandler { startClient(appnum); else startWebApp(app); + } else if (_action.toLowerCase().startsWith("start<span class=hide> ") && + _action.toLowerCase().endsWith("</span>")) { + // IE sucks + String app = _action.substring(23, _action.length() - 7); + int appnum = -1; + try { + appnum = Integer.parseInt(app); + } catch (NumberFormatException nfe) {} + if (appnum >= 0) + startClient(appnum); + else + startWebApp(app); } else { addFormError("Unsupported " + _action); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java index 2bee435335d43ac409cc748ca73ec9cdd9c7389b..984569b9672f3b687e82277839fc6d0a35f59dc6 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java @@ -62,10 +62,10 @@ public class ConfigClientsHelper extends HelperBase { if (ro) buf.append("disabled=\"true\" "); } - buf.append("/></td><td> "); + buf.append("/></td><td> "); if (!enabled) { - buf.append("<button type=\"submit\" name=\"action\" value=\"Start ").append(index).append("\" >Start</button>"); + buf.append("<button type=\"submit\" name=\"action\" value=\"Start ").append(index).append("\" >Start<span class=hide> ").append(index).append("</span></button>"); } - buf.append(" </td><td>").append(desc).append("</td></tr>\n"); + buf.append(" </td><td>").append(desc).append("</td></tr>\n"); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigRestartBean.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigRestartBean.java index e8eb6b26d3008f8c1436ad809515b377faf3bcef..7ae7181bc2e4989969213cdc729b186e6b1afff9 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigRestartBean.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigRestartBean.java @@ -24,20 +24,21 @@ public class ConfigRestartBean { RouterContext ctx = ContextHelper.getContext(null); String systemNonce = getNonce(); if ( (nonce != null) && (systemNonce.equals(nonce)) && (action != null) ) { - if ("shutdownImmediate".equals(action)) { + // Normal browsers send value, IE sends button label + if ("shutdownImmediate".equals(action) || "Shutdown immediately".equals(action)) { ctx.addShutdownTask(new ConfigServiceHandler.UpdateWrapperManagerTask(Router.EXIT_HARD)); //ctx.router().shutdown(Router.EXIT_HARD); // never returns ctx.router().shutdownGracefully(Router.EXIT_HARD); // give the UI time to respond - } else if ("cancelShutdown".equals(action)) { + } else if ("cancelShutdown".equals(action) || "Cancel shutdown".equals(action)) { ctx.router().cancelGracefulShutdown(); - } else if ("restartImmediate".equals(action)) { + } else if ("restartImmediate".equals(action) || "Restart immediately".equals(action)) { ctx.addShutdownTask(new ConfigServiceHandler.UpdateWrapperManagerTask(Router.EXIT_HARD_RESTART)); //ctx.router().shutdown(Router.EXIT_HARD_RESTART); // never returns ctx.router().shutdownGracefully(Router.EXIT_HARD_RESTART); // give the UI time to respond - } else if ("restart".equals(action)) { + } else if ("restart".equalsIgnoreCase(action)) { ctx.addShutdownTask(new ConfigServiceHandler.UpdateWrapperManagerTask(Router.EXIT_GRACEFUL_RESTART)); ctx.router().shutdownGracefully(Router.EXIT_GRACEFUL_RESTART); - } else if ("shutdown".equals(action)) { + } else if ("shutdown".equalsIgnoreCase(action)) { ctx.addShutdownTask(new ConfigServiceHandler.UpdateWrapperManagerTask(Router.EXIT_GRACEFUL)); ctx.router().shutdownGracefully(); } diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 7240281988b926fed4dbfab859f521fd15a957e5..8e66cb54eed530a12f27ea8b6c92b4cac95eda2d 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -5,6 +5,11 @@ <html><head> <title>I2P Router Console - config clients</title> <link rel="stylesheet" href="default.css" type="text/css" /> +<style type='text/css'> +button span.hide{ + display:none; +} +</style> </head><body> <%@include file="nav.jsp" %>