forgejo/templates/user/auth
Nils Goroll d934e0c9fb chore: refactor signup logic (#10915)
This PR is in preparation of, but independent of, an upcoming suggestion for a feature addition:

* The first commit moves a tiny bit of logic into a separate function to prepare for extension of that logic, avoiding duplication
* The second commit moves checking for disabled registrations earlier, which, I think, has merits in terms of performance and resilience (hopefully not significant, but who knows?)
* The third commit adds simple unit tests for SignUp() and SignUpPost() to avoid the long-ish roundtrip over integration tests
*  The forth commit introduces `ctx.Data["DisableRegistrationReason"]` for the signup template to use as the reason printed if `.DisableRegistration` to prepare for other reasons to be added

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10915
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Nils Goroll <nils.goroll@uplex.de>
Co-committed-by: Nils Goroll <nils.goroll@uplex.de>
2026-01-26 22:55:30 +01:00
..
activate.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
captcha.tmpl Defer captcha script loading (#33919) 2025-04-01 02:28:02 +02:00
change_passwd.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
change_passwd_inner.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
finalize_openid.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
forgot_passwd.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
grant.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
grant_error.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
link_account.tmpl [UI] Fix inconsitencies in link/login account page 2024-08-09 10:52:17 +02:00
oauth_container.tmpl Drop SSPI auth support and more Windows files (#7148) 2025-03-08 00:43:41 +00:00
oidc_wellknown.tmpl chore: do not pass the full signing key to template (#10967) 2026-01-26 14:47:48 +01:00
prohibit_login.tmpl Move all login and account creation page labels to be above inputs (#29432) 2024-03-23 12:36:12 +01:00
reset_passwd.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signin.tmpl Refactor login page (#31530) 2024-07-07 14:22:44 +05:00
signin_inner.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signin_openid.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signup.tmpl Refactor login page (#31530) 2024-07-07 14:22:44 +05:00
signup_inner.tmpl chore: refactor signup logic (#10915) 2026-01-26 22:55:30 +01:00
signup_openid_connect.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
signup_openid_navbar.tmpl [Port] gitea#29982 Introduce .secondary-nav and handle .page-content spacing universally 2024-03-28 16:43:09 +01:00
signup_openid_register.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
twofa.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
twofa_scratch.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
webauthn.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
webauthn_error.tmpl Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00