Revert "UX: When requiring user fields at signup, also mark default fields as required (#11356)" (#11475)

This reverts commit 3ef60686ed.
This commit is contained in:
Kris 2020-12-11 12:09:56 -05:00 committed by GitHub
parent a51a06115a
commit ae114a6ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 34 deletions

View File

@ -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);

View File

@ -17,14 +17,7 @@
<table>
<tbody>
<tr class="input create-account-email">
<td class="label">
<label for="new-account-email">
{{i18n "user.email.title"}}
{{~#if userFields~}}
<span class="required">*</span>
{{/if}}
</label>
</td>
<td class="label"><label for="new-account-email">{{i18n "user.email.title"}}</label></td>
<td>
{{#if emailValidated}}
<span class="value">{{accountEmail}}</span>
@ -41,14 +34,7 @@
</tr>
<tr class="input">
<td class="label">
<label for="new-account-username">
{{i18n "user.username.title"}}
{{~#if userFields~}}
<span class="required">*</span>
{{/if}}
</label>
</td>
<td class="label"><label for="new-account-username">{{i18n "user.username.title"}}</label></td>
<td>
{{#if usernameDisabled}}
<span class="value">{{accountUsername}}</span>
@ -63,17 +49,10 @@
<td><label>{{i18n "user.username.instructions"}}</label></td>
</tr>
{{#if siteSettings.enable_names}}
{{#if fullnameRequired}}
<tr class="input">
<td class="label">
<label for="new-account-name">
{{i18n "user.name.title"}}
{{#if siteSettings.full_name_required}}
{{~#if userFields~}}
<span class="required">*</span>
{{/if}}
{{/if}}
</label>
<label for="new-account-name">{{i18n "user.name.title"}}</label>
</td>
<td>
{{#if nameDisabled}}
@ -104,14 +83,7 @@
{{#if passwordRequired}}
<tr class="input">
<td class="label">
<label for="new-account-password">
{{i18n "user.password.title"}}
{{~#if userFields~}}
<span class="required">*</span>
{{/if}}
</label>
</td>
<td class="label"><label for="new-account-password">{{i18n "user.password.title"}}</label></td>
<td>
{{password-field value=accountPassword type="password" id="new-account-password" capsLockOn=capsLockOn}}
</td>

View File

@ -339,7 +339,6 @@
}
}
.login-form,
.user-field {
.required {
vertical-align: top;