class ReviewAndSubmitController {

    @SecuredBySpring(value = "APPLICANT_CONFIRM_SUBMIT", description = "Applicants can confirm they wish to submit their applications")
    @PreAuthorize("hasAuthority('applicant')")
    @GetMapping("/{applicationId}/confirm-submit")
    public String applicationConfirmSubmit(@PathVariable long applicationId,
                                           @ModelAttribute("termsAgreed") Boolean termsAgreed,
                                           @ModelAttribute(FORM_ATTR_NAME) ApplicationSubmitForm form,
                                           Model model) {
        if (!TRUE.equals(termsAgreed)) {
            return format("redirect:/application/%d/summary", applicationId);
        }
        model.addAttribute("applicationId", applicationId);
        return "application-confirm-submit";
    }

}