import org.cacert.gigi.output.DateSelector;
import org.cacert.gigi.output.template.Form;
import org.cacert.gigi.output.template.Template;
-import org.cacert.gigi.pages.LoginPage;
import org.cacert.gigi.pages.Page;
import org.cacert.gigi.util.AuthorizationContext;
-import org.cacert.gigi.util.Notary;
public class AssurePage extends Page {
DateSelector ds = new DateSelector("day", "month", "year");
- Template t;
+ private static final Template t = new Template(AssuranceForm.class.getResource("AssureeSearch.templ"));
public AssurePage() {
- super("Assure someone");
- t = new Template(AssuranceForm.class.getResource("AssureeSearch.templ"));
+ super("Verify someone");
}
AssuranceForm form = Form.getForm(req, AssuranceForm.class);
try {
if (form.submit(out, req)) {
- out.println(translate(req, "Assurance complete."));
+ out.println(translate(req, "Verification complete."));
return;
}
} catch (GigiApiException e) {
e.format(out, Page.getLanguage(req));
- try {
- Notary.checkAssuranceIsPossible(LoginPage.getUser(req), form.getAssuree());
- form.output(out, getLanguage(req), new HashMap<String, Object>());
- } catch (GigiApiException e1) {
- e1.format(out, Page.getLanguage(req));
- }
+ form.output(out, getLanguage(req), new HashMap<String, Object>());
}
return;
} else {
User assuree = User.getById(id);
- User myself = LoginPage.getUser(req);
try {
- Notary.checkAssuranceIsPossible(myself, assuree);
new AssuranceForm(req, assuree).output(out, getLanguage(req), new HashMap<String, Object>());
} catch (GigiApiException e) {
e.format(out, Page.getLanguage(req));