FIX: do not show full name field when accepting invite if full names are disabled
https://meta.discourse.org/t/require-password-for-trusted-user-invites/13750/58?u=techapj
This commit is contained in:
parent
a77ede05e2
commit
be972912cb
|
@ -38,6 +38,11 @@ export default Ember.Controller.extend(PasswordValidation, UsernameValidation, N
|
|||
return usernameFailed || passwordFailed || nameFailed || userFieldsFailed;
|
||||
},
|
||||
|
||||
@computed
|
||||
fullnameRequired() {
|
||||
return this.siteSettings.full_name_required || this.siteSettings.enable_names;
|
||||
},
|
||||
|
||||
actions: {
|
||||
submit() {
|
||||
|
||||
|
|
|
@ -30,11 +30,13 @@
|
|||
<div class="instructions">{{i18n 'user.username.instructions'}}</div>
|
||||
</div>
|
||||
|
||||
<div class="input name-input">
|
||||
<label>{{i18n 'invites.name_label'}}</label>
|
||||
{{input value=accountName id="new-account-name" name="name"}}
|
||||
<div class="instructions">{{nameInstructions}}</div>
|
||||
</div>
|
||||
{{#if fullnameRequired}}
|
||||
<div class="input name-input">
|
||||
<label>{{i18n 'invites.name_label'}}</label>
|
||||
{{input value=accountName id="new-account-name" name="name"}}
|
||||
<div class="instructions">{{nameInstructions}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="input password-input">
|
||||
<label>{{i18n 'invites.password_label'}}</label>
|
||||
|
|
Loading…
Reference in New Issue