diff --git a/app/assets/javascripts/discourse/app/components/fullname-input.gjs b/app/assets/javascripts/discourse/app/components/fullname-input.gjs index 471c1e14294..7251eb95ad2 100644 --- a/app/assets/javascripts/discourse/app/components/fullname-input.gjs +++ b/app/assets/javascripts/discourse/app/components/fullname-input.gjs @@ -1,16 +1,26 @@ import Component from "@glimmer/component"; import { on } from "@ember/modifier"; +import { service } from "@ember/service"; import InputTip from "discourse/components/input-tip"; import TextField from "discourse/components/text-field"; import valueEntered from "discourse/helpers/value-entered"; export default class SidebarEditNavigationMenuTagsModal extends Component { + @service siteSettings; + get showFullname() { return ( this.siteSettings.full_name_required || this.siteSettings.enable_names ); } + get showFullnameInstructions() { + return ( + this.siteSettings.signup_form_full_name_instructions && + !this.args.nameValidation.reason + ); + } + } diff --git a/app/assets/javascripts/discourse/app/components/modal/create-account.hbs b/app/assets/javascripts/discourse/app/components/modal/create-account.hbs index 1e45eb1bf86..9a2b85478e8 100644 --- a/app/assets/javascripts/discourse/app/components/modal/create-account.hbs +++ b/app/assets/javascripts/discourse/app/components/modal/create-account.hbs @@ -55,19 +55,14 @@ - {{#if - (or - this.emailValidation.ok - (and this.emailValidationVisible this.emailValidation.reason) - ) - }} + {{#if this.showEmailValidation}} {{else}} - {{i18n "user.email.instructions"}} + {{this.emailInstructions}} {{/if}} @@ -89,10 +84,17 @@ {{i18n "user.username.title"}} - + {{#if this.showUsernameInstructions}} + + {{this.siteSettings.signup_form_username_instructions}} + + + {{else}} + + {{/if}} {{#if this.fullnameRequired}} @@ -120,7 +122,7 @@