Skip to content

A platform for community discussion. Free, open, simple.

DEV: Let a signup flow add fields to the code-signup email step (#43195)

Keegan George4e0bd5a9332d
diff --git a/frontend/discourse/app/components/code-login-form.gjs b/frontend/discourse/app/components/code-login-form.gjs
index c00a97447ba..a431c3745b5 100644
--- a/frontend/discourse/app/components/code-login-form.gjs
+++ b/frontend/discourse/app/components/code-login-form.gjs
@@ -724,6 +724,14 @@ export default class CodeLoginForm extends Component {
<field.Control autofocus="autofocus" autocomplete="username" />
</form.Field>
+ {{! Lets a signup flow add its own fields to this form — an agreement
+ it needs accepted before the account exists, say — so they are
+ validated and submitted together with the email. }}
+ <PluginOutlet
+ @name="code-login-email-step-fields"
+ @outletArgs={{lazyHash form=form context=@context}}
+ />
+
{{#if this.codeError}}
<div class="code-login-form__error" aria-live="polite" role="alert">
{{this.codeError}}