Changeset 6685b818


Ignore:
Timestamp:
Sep 20, 2015 7:28:11 PM (5 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
7dd438b
Parents:
c56f686
Message:

/configreseed: Add 'Reset URL list' button for revert to default hosts (ticket #1554, thanks dzirtt@…)

Location:
apps/routerconsole
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigReseedHandler.java

    rc56f686 r6685b818  
    9797        } else if (_action.equals(_("Save changes"))) {
    9898            saveChanges();
     99        } else if (_action.equals(_("Reset URL list"))) {
     100            resetUrlList();
    99101        }
    100102        //addFormError(_("Unsupported") + ' ' + _action + '.');
     103    }
     104
     105    private void resetUrlList() {
     106        if (_context.router().saveConfig(Reseeder.PROP_RESEED_URL, null))
     107            addFormNotice(_("URL list reset successfully"));
     108        else
     109            addFormError(_("URL list reset failed"));
    101110    }
    102111
  • apps/routerconsole/jsp/configreseed.jsp

    rc56f686 r6685b818  
    7878<b><%=intl._("Use non-SSL only")%></b></td></tr>
    7979<tr><td class="mediumtags" align="right"><b><%=intl._("Reseed URLs")%>:</b></td>
    80 <td><textarea wrap="off" name="reseedURL" cols="60" rows="7" spellcheck="false"><jsp:getProperty name="reseedHelper" property="reseedURL" /></textarea></td></tr>
     80<td><textarea wrap="off" name="reseedURL" cols="60" rows="7" spellcheck="false"><jsp:getProperty name="reseedHelper" property="reseedURL" /></textarea>
     81<div class="formaction"><input type="submit" name="action" value="<%=intl._("Reset URL list")%>" /></div>
     82</td></tr>
    8183
    8284<tr><td class="mediumtags" align="right"><b><%=intl._("Enable HTTP Proxy?")%></b></td>
Note: See TracChangeset for help on using the changeset viewer.