]> WPIA git - gigi.git/commitdiff
Do a dummy "Change-password-form"
authorFelix Dörre <felix@dogcraft.de>
Fri, 4 Jul 2014 23:43:36 +0000 (01:43 +0200)
committerFelix Dörre <felix@dogcraft.de>
Fri, 4 Jul 2014 23:43:36 +0000 (01:43 +0200)
src/org/cacert/gigi/Gigi.java
src/org/cacert/gigi/pages/account/ChangeForm.java [new file with mode: 0644]
src/org/cacert/gigi/pages/account/ChangePasswordForm.templ [new file with mode: 0644]
src/org/cacert/gigi/pages/account/ChangePasswordPage.java [new file with mode: 0644]

index bdd0e9cd2a8ca7a53ba25145cdd6af4b12300308..4f51029c45b7f2db61441ac9e8b59241783ecc96 100644 (file)
@@ -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 (file)
index 0000000..087f418
--- /dev/null
@@ -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<String, Object> 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 (file)
index 0000000..58ca70a
--- /dev/null
@@ -0,0 +1,23 @@
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper" width="400">\r
+  <tr>\r
+    <td colspan="2" class="title">Kennwort &auml;ndern</td>\r
+  </tr>\r
+  <tr>\r
+    <td class="DataTD">Altes Kennwort: </td>\r
+    <td class="DataTD"><input type="password" name="oldpassword"></td>\r
+  </tr>\r
+  <tr>\r
+    <td class="DataTD">Neues Kennwort<font color="red">*</font>: </td>\r
+    <td class="DataTD"><input type="password" name="pword1"></td>\r
+  </tr>\r
+  <tr>\r
+    <td class="DataTD">Kennwort best&auml;tigen<font color="red">*</font>: </td>\r
+    <td class="DataTD"><input type="password" name="pword2"></td>\r
+  </tr>\r
+  <tr>\r
+    <td class="DataTD" colspan="2"><font color="red">*</font>Beachten Sie bitte, f&uuml;r eine hohe Sicherheit muss das Kennwort mindestens einen Gro&szlig;buchstaben, Kleinbuchstaben, Zahl und Sonderzeichen enthalten (alle Leerzeichen am Anfang und am Ende werden entfernt).</td>\r
+  </tr>\r
+  <tr>\r
+    <td class="DataTD" colspan="2"><input type="submit" name="process" value="Kennwort &auml;ndern"></td>\r
+  </tr>\r
+</table>\r
diff --git a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java
new file mode 100644 (file)
index 0000000..fd4c9b2
--- /dev/null
@@ -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<String, Object>());
+       }
+
+}