diff --git a/src/main/java/smithereen/routes/SessionRoutes.java b/src/main/java/smithereen/routes/SessionRoutes.java index 65f24135..853c5429 100644 --- a/src/main/java/smithereen/routes/SessionRoutes.java +++ b/src/main/java/smithereen/routes/SessionRoutes.java @@ -411,7 +411,13 @@ public static Object requestSignupInvite(Request req, Response resp){ context(req).getUsersController().requestSignupInvite(req, firstName, lastName, email, reason); return new RenderedTemplateResponse("generic_message", req).with("message", lang(req).get("signup_request_submitted")); }catch(UserErrorException x){ - return wrapForm(req, resp, "register_form_request_invite", "/account/requestInvite", lang(req).get("signup_title"), "request_invitation", "requestInvite", List.of("first_name", "last_name", "email", "reason"), req::queryParams, lang(req).get(x.getMessage())); + return new RenderedTemplateResponse("register_request_invite", req) + .with("first_name", req.queryParams("first_name")) + .with("last_name", req.queryParams("last_name")) + .with("email", req.queryParams("email")) + .with("reason", req.queryParams("reason")) + .with("message", lang(req).get(x.getMessage())) + .pageTitle(lang(req).get("signup_title")); } } } diff --git a/src/main/resources/templates/common/register_request_invite.twig b/src/main/resources/templates/common/register_request_invite.twig new file mode 100644 index 00000000..ad538905 --- /dev/null +++ b/src/main/resources/templates/common/register_request_invite.twig @@ -0,0 +1,6 @@ +{%extends "page"%} +{%block content%} +
+{%include "register_form_request_invite"%} +
+{%endblock%} \ No newline at end of file diff --git a/src/main/resources/templates/desktop/forms.twig b/src/main/resources/templates/desktop/forms.twig index d7f62410..c2ef0dfd 100644 --- a/src/main/resources/templates/desktop/forms.twig +++ b/src/main/resources/templates/desktop/forms.twig @@ -71,7 +71,7 @@ : - + {%if options.explanation is not null%}
{{options.explanation}} {%endif%} diff --git a/src/main/resources/templates/mobile/forms.twig b/src/main/resources/templates/mobile/forms.twig index 893e7249..ed66b16e 100644 --- a/src/main/resources/templates/mobile/forms.twig +++ b/src/main/resources/templates/mobile/forms.twig @@ -44,7 +44,7 @@
:
- + {%if options.explanation is not null%}
{{options.explanation}} {%endif%}