]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/MailCertificateAdd.java
Format code according do BenBE's formatter.
[gigi.git] / src / org / cacert / gigi / pages / account / MailCertificateAdd.java
index c25db15f89cf18f426ed9703f682a2740d9b4d47..9541a5ad49c9d3db66c7082da217f75c83f1b0a2 100644 (file)
@@ -12,36 +12,38 @@ import org.cacert.gigi.output.template.Template;
 import org.cacert.gigi.pages.Page;
 
 public class MailCertificateAdd extends Page {
-       public static final String PATH = "/account/certs/email/new";
-       Template t = new Template(MailCertificateAdd.class.getResource("RequestCertificate.templ"));
-
-       public MailCertificateAdd() {
-               super("Create Email certificate");
-       }
-
-       @Override
-       public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-               HashMap<String, Object> vars = new HashMap<String, Object>();
-               vars.put("CCA", "<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>");
-
-               t.output(resp.getWriter(), getLanguage(req), vars);
-       }
-
-       @Override
-       public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-               IssueCertificateForm f;
-               if (req.getParameter(Form.CSRF_FIELD) != null) {
-                       f = Form.getForm(req, IssueCertificateForm.class);
-                       if (f.submit(resp.getWriter(), req)) {
-                               Certificate c = f.getResult();
-                               String ser = c.getSerial();
-                               resp.sendRedirect(MailCertificates.PATH + "/" + ser);
-                       }
-               } else {
-                       f = new IssueCertificateForm(req);
-                       f.submit(resp.getWriter(), req);
-               }
-               f.output(resp.getWriter(), getLanguage(req), Collections.<String, Object> emptyMap());
-
-       }
+
+    public static final String PATH = "/account/certs/email/new";
+
+    Template t = new Template(MailCertificateAdd.class.getResource("RequestCertificate.templ"));
+
+    public MailCertificateAdd() {
+        super("Create Email certificate");
+    }
+
+    @Override
+    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        HashMap<String, Object> vars = new HashMap<String, Object>();
+        vars.put("CCA", "<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>");
+
+        t.output(resp.getWriter(), getLanguage(req), vars);
+    }
+
+    @Override
+    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        IssueCertificateForm f;
+        if (req.getParameter(Form.CSRF_FIELD) != null) {
+            f = Form.getForm(req, IssueCertificateForm.class);
+            if (f.submit(resp.getWriter(), req)) {
+                Certificate c = f.getResult();
+                String ser = c.getSerial();
+                resp.sendRedirect(MailCertificates.PATH + "/" + ser);
+            }
+        } else {
+            f = new IssueCertificateForm(req);
+            f.submit(resp.getWriter(), req);
+        }
+        f.output(resp.getWriter(), getLanguage(req), Collections.<String,Object>emptyMap());
+
+    }
 }