From: Felix Dörre Date: Fri, 4 Jul 2014 23:43:36 +0000 (+0200) Subject: Do a dummy "Change-password-form" X-Git-Url: https://code.wpia.club/?p=gigi.git;a=commitdiff_plain;h=e76545ff41616858934e3ed8894bc1de902a039f Do a dummy "Change-password-form" --- diff --git a/src/org/cacert/gigi/Gigi.java b/src/org/cacert/gigi/Gigi.java index bdd0e9cd..4f51029c 100644 --- a/src/org/cacert/gigi/Gigi.java +++ b/src/org/cacert/gigi/Gigi.java @@ -25,6 +25,7 @@ import org.cacert.gigi.pages.MainPage; import org.cacert.gigi.pages.Page; import org.cacert.gigi.pages.TestSecure; import org.cacert.gigi.pages.Verify; +import org.cacert.gigi.pages.account.ChangePasswordPage; import org.cacert.gigi.pages.account.MailAdd; import org.cacert.gigi.pages.account.MailCertificates; import org.cacert.gigi.pages.account.MailOverview; @@ -54,6 +55,7 @@ public class Gigi extends HttpServlet { pages.put(AssurePage.PATH + "/*", new AssurePage()); pages.put(MailCertificates.PATH, new MailCertificates()); pages.put(MyDetails.PATH, new MyDetails()); + pages.put(ChangePasswordPage.PATH, new ChangePasswordPage()); pages.put(RegisterPage.PATH, new RegisterPage()); pages.put(MailOverview.DEFAULT_PATH, new MailOverview( "My email addresses")); diff --git a/src/org/cacert/gigi/pages/account/ChangeForm.java b/src/org/cacert/gigi/pages/account/ChangeForm.java new file mode 100644 index 00000000..087f418e --- /dev/null +++ b/src/org/cacert/gigi/pages/account/ChangeForm.java @@ -0,0 +1,32 @@ +package org.cacert.gigi.pages.account; + +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.cacert.gigi.Language; +import org.cacert.gigi.output.Form; +import org.cacert.gigi.output.Template; + +public class ChangeForm extends Form { + private static Template t; + static { + t = new Template(new InputStreamReader( + ChangePasswordPage.class + .getResourceAsStream("ChangePasswordForm.templ"))); + } + + @Override + public void outputContent(PrintWriter out, Language l, + Map vars) { + t.output(out, l, vars); + } + + @Override + public boolean submit(PrintWriter out, HttpServletRequest req) { + return false; + } + +} \ No newline at end of file diff --git a/src/org/cacert/gigi/pages/account/ChangePasswordForm.templ b/src/org/cacert/gigi/pages/account/ChangePasswordForm.templ new file mode 100644 index 00000000..58ca70a3 --- /dev/null +++ b/src/org/cacert/gigi/pages/account/ChangePasswordForm.templ @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + +
Kennwort ändern
Altes Kennwort:
Neues Kennwort*:
Kennwort bestätigen*:
*Beachten Sie bitte, für eine hohe Sicherheit muss das Kennwort mindestens einen Großbuchstaben, Kleinbuchstaben, Zahl und Sonderzeichen enthalten (alle Leerzeichen am Anfang und am Ende werden entfernt).
diff --git a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java new file mode 100644 index 00000000..fd4c9b2d --- /dev/null +++ b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java @@ -0,0 +1,25 @@ +package org.cacert.gigi.pages.account; + +import java.io.IOException; +import java.util.HashMap; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.cacert.gigi.pages.Page; + +public class ChangePasswordPage extends Page { + public static final String PATH = "/account/password"; + + public ChangePasswordPage() { + super("Change Password"); + } + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) + throws IOException { + new ChangeForm().output(resp.getWriter(), getLanguage(req), + new HashMap()); + } + +}