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=703bbdc33bb4d47d3be65a1405357be7f91838ea;hb=1d24b8e1fe36651f22339ddbb7b1a3b34b48c081;hpb=2824d1c165c501e2f3a8809044788b33b81f478a diff --git a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java index 703bbdc3..c17f2d8d 100644 --- a/src/org/cacert/gigi/pages/account/ChangePasswordPage.java +++ b/src/org/cacert/gigi/pages/account/ChangePasswordPage.java @@ -6,18 +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"); - } + public static final String PATH = "/account/password"; - @Override - public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - new ChangeForm().output(resp.getWriter(), getLanguage(req), new HashMap()); - } + 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); + } }