diff --git a/app/assets/javascripts/discourse/app/controllers/create-account.js b/app/assets/javascripts/discourse/app/controllers/create-account.js index 588826f6bc2..fce8b5e08a3 100644 --- a/app/assets/javascripts/discourse/app/controllers/create-account.js +++ b/app/assets/javascripts/discourse/app/controllers/create-account.js @@ -99,6 +99,14 @@ export default Controller.extend( return authOptions && !canEditName; }, + @discourseComputed + fullnameRequired() { + return ( + this.get("siteSettings.full_name_required") || + this.get("siteSettings.enable_names") + ); + }, + @discourseComputed("authOptions.auth_provider") passwordRequired(authProvider) { return isEmpty(authProvider); 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 b672ef964ed..a353fb0f889 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs @@ -17,14 +17,7 @@ - + - + - {{#if siteSettings.enable_names}} + {{#if fullnameRequired}} - + diff --git a/app/assets/stylesheets/common/base/user.scss b/app/assets/stylesheets/common/base/user.scss index 272ce23aadd..24a318e2fbe 100644 --- a/app/assets/stylesheets/common/base/user.scss +++ b/app/assets/stylesheets/common/base/user.scss @@ -339,7 +339,6 @@ } } -.login-form, .user-field { .required { vertical-align: top;
- - {{#if usernameDisabled}} {{accountUsername}} @@ -63,17 +49,10 @@
- + {{#if nameDisabled}} @@ -104,14 +83,7 @@ {{#if passwordRequired}}
- - {{password-field value=accountPassword type="password" id="new-account-password" capsLockOn=capsLockOn}}