source: apps/routerconsole/jsp/configadvanced.jsp @ 03588e76

Last change on this file since 03588e76 was 03588e76, checked in by zzz <zzz@…>, 4 years ago

Console: Safer processing of changes on /configadvanced

  • Property mode set to 100644
File size: 3.7 KB
Line 
1<%@page contentType="text/html"%>
2<%@page trimDirectiveWhitespaces="true"%>
3<%@page pageEncoding="UTF-8"%>
4<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5
6<html><head>
7<%@include file="css.jsi" %>
8<%=intl.title("config advanced")%>
9<script src="/js/ajax.js" type="text/javascript"></script>
10<%@include file="summaryajax.jsi" %>
11</head><body onload="initAjax()">
12
13<%@include file="summary.jsi" %>
14
15<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHelper" id="advancedhelper" scope="request" />
16<jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
17
18<h1><%=intl._t("I2P Advanced Configuration")%></h1>
19<div class="main" id="config_advanced">
20
21 <%@include file="confignav.jsi" %>
22
23 <jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" />
24<%@include file="formhandler.jsi" %>
25 <div class="configure">
26 <div class="wideload">
27
28<h3 id="ffconf" class="tabletitle"><%=intl._t("Floodfill Configuration")%></h3>
29<form action="" method="POST">
30 <table id="floodfillconfig" class="configtable">
31  <tr><td class="infohelp">
32<%=intl._t("Floodfill participation helps the network, but may use more of your computer's resources.")%>
33<%
34    if (advancedhelper.isFloodfill()) {
35%> (<%=intl._t("This router is currently a floodfill participant.")%>)<%
36    } else {
37%> (<%=intl._t("This router is not currently a floodfill participant.")%>)<%
38    }
39%>
40  </td></tr>
41  <tr><td>
42<input type="hidden" name="nonce" value="<%=pageNonce%>" >
43<input type="hidden" name="action" value="ff" >
44<b><%=intl._t("Enrollment")%>:</b>
45<label><input type="radio" class="optbox" name="ff" value="auto" <%=advancedhelper.getFFChecked(2) %> >
46<%=intl._t("Automatic")%></label>&nbsp;
47<label><input type="radio" class="optbox" name="ff" value="true" <%=advancedhelper.getFFChecked(1) %> >
48<%=intl._t("Force On")%></label>&nbsp;
49<label><input type="radio" class="optbox" name="ff" value="false" <%=advancedhelper.getFFChecked(0) %> >
50<%=intl._t("Disable")%></label>
51  </td></tr>
52  <tr><td class="optionsave" align="right">
53<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
54  </td></tr>
55 </table>
56</form>
57
58<h3 id="advancedconfig" class="tabletitle"><%=intl._t("Advanced I2P Configuration")%>&nbsp;<a title="Help with additional configuration settings" href="/help#advancedsettings">[Additional Options]</a></h3>
59<%
60  String advConfig = advancedhelper.getSettings();
61  if (advancedhelper.isAdvanced()) {
62%>
63 <form action="" method="POST">
64 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
65 <input type="hidden" name="action" value="blah" >
66 <input type="hidden" name="nofilter_oldConfig" value="<%=advConfig%>" >
67<% }  // isAdvanced %>
68<table class="configtable" id="advconf">
69<% if (advancedhelper.isAdvanced()) { %>
70 <tr><td class="infohelp">
71<b><%=intl._t("NOTE")%>:</b> <%=intl._t("Some changes may require a restart to take effect.")%>
72 </td></tr>
73<% } else { %>
74 <tr><td>
75<%=intl._t("To make changes, edit the file: {0}", "<tt>" + advancedhelper.getConfigFileName() + "</tt>")%>
76 </td></tr>
77<% }  // isAdvanced %>
78 <tr><td class="tabletextarea">
79 <textarea id="advancedsettings" rows="32" cols="60" name="nofilter_config" wrap="off" spellcheck="false" <% if (!advancedhelper.isAdvanced()) { %>readonly="readonly"<% } %>><%=advConfig%></textarea>
80 </td></tr>
81<% if (advancedhelper.isAdvanced()) { %>
82 <tr><td class="optionsave" align="right">
83        <input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
84        <input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
85 </td></tr>
86<% }  // isAdvanced %>
87</table>
88<% if (advancedhelper.isAdvanced()) { %>
89</form>
90<% }  // isAdvanced %>
91</div></div></div></body></html>
Note: See TracBrowser for help on using the repository browser.