diff --git a/app/assets/javascripts/discourse/app/controllers/create-account.js b/app/assets/javascripts/discourse/app/controllers/create-account.js index b2e9622923b..52a3f7230a7 100644 --- a/app/assets/javascripts/discourse/app/controllers/create-account.js +++ b/app/assets/javascripts/discourse/app/controllers/create-account.js @@ -407,6 +407,17 @@ export default Controller.extend( } }, + @discourseComputed("authOptions.associate_url", "authOptions.auth_provider") + associateHtml(url, provider) { + if (!url) { + return; + } + return I18n.t("create_account.associate", { + associate_link: url, + provider: I18n.t(`login.${provider}.name`), + }); + }, + actions: { externalLogin(provider) { this.login.send("externalLogin", provider, { signup: true }); diff --git a/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs b/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs index 846bee341d3..c33f956d23f 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs @@ -16,6 +16,11 @@
+ {{#if associateHtml}} + + {{/if}}