forked from I2P_Developers/i2p.i2p
implement delete on details page
This commit is contained in:
@@ -312,7 +312,7 @@ public class AddressbookBean
|
||||
}
|
||||
// clear search when adding
|
||||
search = null;
|
||||
} else if (action.equals(_("Delete Selected"))) {
|
||||
} else if (action.equals(_("Delete Selected")) || action.equals(_("Delete Entry"))) {
|
||||
String name = null;
|
||||
int deleted = 0;
|
||||
for (String n : deletionMarks) {
|
||||
@@ -328,6 +328,8 @@ public class AddressbookBean
|
||||
else
|
||||
// parameter will always be >= 2
|
||||
message = ngettext("1 destination deleted.", "{0} destinations deleted.", deleted);
|
||||
} else {
|
||||
message = _("No entries selected to delete.");
|
||||
}
|
||||
}
|
||||
if( changed ) {
|
||||
|
||||
@@ -263,7 +263,7 @@ public class NamingServiceBean extends AddressbookBean
|
||||
}
|
||||
// clear search when adding
|
||||
search = null;
|
||||
} else if (action.equals(_("Delete Selected"))) {
|
||||
} else if (action.equals(_("Delete Selected")) || action.equals(_("Delete Entry"))) {
|
||||
String name = null;
|
||||
int deleted = 0;
|
||||
for (String n : deletionMarks) {
|
||||
@@ -281,6 +281,8 @@ public class NamingServiceBean extends AddressbookBean
|
||||
else
|
||||
// parameter will always be >= 2
|
||||
message = ngettext("1 destination deleted.", "{0} destinations deleted.", deleted);
|
||||
} else {
|
||||
message = _("No entries selected to delete.");
|
||||
}
|
||||
}
|
||||
if( changed ) {
|
||||
|
||||
@@ -125,10 +125,12 @@
|
||||
</tr></table>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<form method="POST" action="details.jsp">
|
||||
<form method="POST" action="addressbook.jsp">
|
||||
<input type="hidden" name="serial" value="${book.serial}">
|
||||
<input type="hidden" name="h" value="<%=detail%>">
|
||||
<input type="submit" name="action" value="<%=intl._("Delete")%>" >
|
||||
<input type="hidden" name="begin" value="0">
|
||||
<input type="hidden" name="end" value="99">
|
||||
<input type="hidden" name="checked" value="<%=detail%>">
|
||||
<input type="submit" name="action" value="<%=intl._("Delete Entry")%>" >
|
||||
</form>
|
||||
</div>
|
||||
<%
|
||||
|
||||
Reference in New Issue
Block a user