package org.cacert.gigi.pages.wot;
import java.io.PrintWriter;
-import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
templ = new Template(AssuranceForm.class.getResource("AssuranceForm.templ"));
}
- public AssuranceForm(HttpServletRequest hsr, int assuree) {
+ public AssuranceForm(HttpServletRequest hsr, User assuree) {
super(hsr);
- this.assuree = new User(assuree);
+ this.assuree = assuree;
assureeName = this.assuree.getName();
dob = this.assuree.getDob();
}
res.putAll(vars);
res.put("nameExplicit", assuree.getName());
res.put("name", assuree.getName().toString());
- try {
- res.put("maxpoints", assuree.getMaxAssurePoints());
- } catch (SQLException e) {
- e.printStackTrace();
- }
+ res.put("maxpoints", assuree.getMaxAssurePoints());
res.put("dob", sdf.format(assuree.getDob()));
res.put("dobFmt2", sdf2.format(assuree.getDob()));
templ.output(out, l, res);
try {
Notary.assure(Page.getUser(req), assuree, assureeName, dob, pointsI, req.getParameter("location"), req.getParameter("date"));
return true;
- } catch (SQLException e) {
- e.printStackTrace();
} catch (GigiApiException e) {
e.format(out, Page.getLanguage(req));
}