--- /dev/null
+package org.cacert.gigi.pages.account;
+
+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.Template;
+
+public class MailAddForm extends Form {
+ private static Template t;
+ static {
+ t = new Template(ChangePasswordPage.class.getResource("MailAddForm.templ"));
+ }
+
+ public MailAddForm(HttpServletRequest hsr) {
+ super(hsr);
+ }
+
+ @Override
+ public boolean submit(PrintWriter out, HttpServletRequest req) {
+ return false;
+ }
+
+ @Override
+ protected void outputContent(PrintWriter out, Language l, Map<String, Object> vars) {
+ t.output(out, l, vars);
+ }
+
+}
--- /dev/null
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper dataTable">
+ <thead>
+ <tr>
+ <th colspan="2" class="title"><?=_Add Email?></th>
+ </tr>
+ </thead>
+<tbody>
+ <tr>
+ <td width="125"><?=_Email Addresses?> </td>
+ <td width="125"><input type="text" name="newemail" value=""></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input type="submit" name="addmail" value="<?=_I own or am authorised to control this email address?>"></td>
+ </tr>
+</tbody>
+</table>
--- /dev/null
+package org.cacert.gigi.pages.account;
+
+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.Template;
+
+public class MailManagementForm extends Form {
+ private static Template t;
+ static {
+ t = new Template(ChangePasswordPage.class.getResource("MailManagementForm.templ"));
+ }
+
+ public MailManagementForm(HttpServletRequest hsr) {
+ super(hsr);
+ }
+
+ @Override
+ public boolean submit(PrintWriter out, HttpServletRequest req) {
+ return false;
+ }
+
+ @Override
+ protected void outputContent(PrintWriter out, Language l, Map<String, Object> vars) {
+ t.output(out, l, vars);
+ }
+
+}
--- /dev/null
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper dataTable">
+ <thead>
+ <tr>
+ <th colspan="4"><?=_Email Accounts?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><?=_Default?></td>
+ <td><?=_Status?></td>
+ <td><?=_Delete?></td>
+ <td><?=_Address?></td>
+ </tr>
+ <?=$mailData?>
+ <tr>
+ <td colspan="2"><input type="submit" name="makedefault" value="Setze als Standard"></td>
+ <td colspan="2"><input type="submit" name="delete" value="Löschen"></td>
+ </tr>
+ </tbody>
+</table>
vars.put("mailData", t);
vars.put("res", rs);
vars.put("us", us.getEmail());
+ vars.put("addForm", new MailAddForm(req));
+ vars.put("manForm", new MailManagementForm(req));
getDefaultTemplate().output(resp.getWriter(), lang, vars);
} catch (SQLException e) {
e.printStackTrace();
}
}
+ @Override
+ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+ System.out.println();
+ super.doPost(req, resp);
+ }
+
private class MailTable implements Outputable {
private String mails, userMail;
-<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper dataTable">
- <thead>
- <tr>
- <th colspan="4"><?=_Email Accounts?></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><?=_Default?></td>
- <td><?=_Status?></td>
- <td><?=_Delete?></td>
- <td><?=_Address?></td>
- </tr>
- <?=$mailData?>
- <tr>
- <td colspan="2"><input type="submit" name="makedefault" value="Setze als Standard"></td>
- <td colspan="2"><input type="submit" name="process" value="Löschen"></td>
- </tr>
- </tbody>
-</table>
+<?=$manForm?>
<p>
<?=_Please Note: You can not set an unverified account as a default account, and you can not remove a default account. To remove the default account you must set another verified account as the default.?>
</p>
<br/>
-<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper dataTable">
- <thead>
- <tr>
- <th colspan="2" class="title"><?=_Add Email?></th>
- </tr>
- </thead>
-<tbody>
- <tr>
- <td width="125"><?=_Email Addresses?> </td>
- <td width="125"><input type="text" name="newemail" value=""></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" name="process" value="<?=_I own or am authorised to control this email address?>"></td>
- </tr>
-</tbody></table>
+<?=$addForm?>
<p>
<?=_Currently we only issue certificates for Punycode domains if the person requesting them has code signing attributes attached to their account, as these have potentially slightly higher security risk.?>
</p>