added new state bits to MailingList, implemented form for editing those

This commit is contained in:
2022-04-22 10:25:24 +02:00
parent 5710a89b52
commit 7bf492e469
8 changed files with 120 additions and 79 deletions

View File

@@ -21,6 +21,7 @@ import java.util.Map;
import static de.srsoftware.widerhall.Constants.*;
import static de.srsoftware.widerhall.Util.t;
import static de.srsoftware.widerhall.data.MailingList.*;
public class Web extends TemplateServlet {
public static final String WEB_ROOT = "/web";
@@ -300,12 +301,13 @@ public class Web extends TemplateServlet {
if (!error){
try {
list.forwardFrom(Util.getCheckbox(req, "forward_from"))
.forwardAttached(Util.getCheckbox(req, "forward_attached"))
.hideReceivers(Util.getCheckbox(req, "hide_receivers"))
.replyToList(Util.getCheckbox(req, "reply_to_list"))
.open(Util.getCheckbox(req,"open"))
.archive(Util.getCheckbox(req,"archive"));
list.forwardFrom(Util.getCheckbox(req, KEY_FORWARD_FROM))
.forwardAttached(Util.getCheckbox(req, KEY_FORWARD_ATTACHED))
.hideReceivers(Util.getCheckbox(req, KEY_HIDE_RECEIVERS))
.replyToList(Util.getCheckbox(req, KEY_REPLY_TO_LIST))
.openForGuests(Util.getCheckbox(req,KEY_OPEN_FOR_GUESTS))
.openForSubscribers(Util.getCheckbox(req,KEY_OPEN_FOR_SUBSCRIBERS))
.archive(Util.getCheckbox(req,KEY_ARCHIVE));
data.put(NOTES,t("Sucessfully updated MailingList!"));
} catch (SQLException e){
LOG.warn("Failed to update MailingList:",e);