Browse Source

minor code improvement

drop_old_mail
Stephan Richter 3 years ago
parent
commit
df1e4c5840
  1. 2
      pom.xml
  2. 6
      src/main/java/de/srsoftware/widerhall/web/Web.java
  3. 3
      static/templates/unsubscribe.st

2
pom.xml

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<groupId>org.example</groupId>
<artifactId>Widerhall</artifactId>
<version>0.2.16</version>
<version>0.2.17</version>
<build>
<plugins>
<plugin>

6
src/main/java/de/srsoftware/widerhall/web/Web.java

@ -26,6 +26,7 @@ public class Web extends TemplateServlet { @@ -26,6 +26,7 @@ public class Web extends TemplateServlet {
public static final String WEB_ROOT = "/web";
private static final String ADD_LIST = "add_list";
private static final String CONFIRM = "confirm";
private static final String CSS = "css";
private static final Logger LOG = LoggerFactory.getLogger(Web.class);
private static final String ADMIN = "admin";
private static final String INSPECT = "inspect";
@ -197,9 +198,10 @@ public class Web extends TemplateServlet { @@ -197,9 +198,10 @@ public class Web extends TemplateServlet {
loadTemplates();
data.put(NOTES,t("Templates have been reloaded"));
path = INDEX;
case "css":
case INDEX:
case UNSUBSCRIBE:
data.put(LIST,list.email());
case CSS:
case INDEX:
return loadTemplate(path,data,resp);
case SUBSCRIBE:
if (list.isOpenFor(user)) {

3
static/templates/unsubscribe.st

@ -12,9 +12,8 @@ @@ -12,9 +12,8 @@
«messages()»
<h1>Widerhall Subscription</h1>
<form method="POST">
<input type="hidden" name="list" value="«data.list.email.prefix»@«data.list.email.domain»" />
<fieldset>
<legend>Un-subscribe from "«data.list.email.prefix»@«data.list.email.domain»"</legend>
<legend>Un-subscribe from "«data.list»"</legend>
<label>
<input type="text" name="email" value="«if(data.email)»«data.email»«else»«data.user.email»«endif»">
Email

Loading…
Cancel
Save