X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Faccount%2FChangePasswordPage.java;h=c17f2d8d652354d28c60b1580565e659d16c220d;hp=fd4c9b2d6382338f952c73b1f443e13c9d213d7f;hb=1d24b8e1fe36651f22339ddbb7b1a3b34b48c081;hpb=e76545ff41616858934e3ed8894bc1de902a039f diff --git a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java index fd4c9b2d..c17f2d8d 100644 --- a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java +++ b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java @@ -6,20 +6,26 @@ import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.cacert.gigi.output.Form; 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()); - } + + public static final String PATH = "/account/password"; + + public ChangePasswordPage() { + super("Change Password"); + } + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { + new ChangeForm(req, getUser(req)).output(resp.getWriter(), getLanguage(req), new HashMap()); + } + + @Override + public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { + ChangeForm f = Form.getForm(req, ChangeForm.class); + f.submit(resp.getWriter(), req); + } }