mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Issues signing in without local logins
This commit is contained in:
parent
8e208d9d1c
commit
00c791b12e
3 changed files with 10 additions and 3 deletions
|
@ -16,7 +16,9 @@ export default DiscourseController.extend(ModalFunctionality, {
|
|||
prefilledUsername: null,
|
||||
tosAccepted: false,
|
||||
|
||||
hasAuthOptions: Em.computed.notEmpty('authOptions'),
|
||||
canCreateLocal: Discourse.computed.setting('enable_local_logins'),
|
||||
showCreateForm: Em.computed.or('hasAuthOptions', 'canCreateLocal'),
|
||||
|
||||
resetForm: function() {
|
||||
this.setProperties({
|
||||
|
|
|
@ -128,16 +128,19 @@ export default DiscourseController.extend(ModalFunctionality, {
|
|||
|
||||
authenticationComplete: function(options) {
|
||||
if (options.requires_invite) {
|
||||
this.send('showLogin');
|
||||
this.flash(I18n.t('login.requires_invite'), 'success');
|
||||
this.set('authenticate', null);
|
||||
return;
|
||||
}
|
||||
if (options.awaiting_approval) {
|
||||
this.send('showLogin');
|
||||
this.flash(I18n.t('login.awaiting_approval'), 'success');
|
||||
this.set('authenticate', null);
|
||||
return;
|
||||
}
|
||||
if (options.awaiting_activation) {
|
||||
this.send('showLogin');
|
||||
this.flash(I18n.t('login.awaiting_confirmation'), 'success');
|
||||
this.set('authenticate', null);
|
||||
return;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{{#unless complete}}
|
||||
<div class="modal-body">
|
||||
{{login-buttons action="externalLogin"}}
|
||||
{{#unless hasAuthOptions}}
|
||||
{{login-buttons action="externalLogin"}}
|
||||
{{/unless}}
|
||||
|
||||
{{#if canCreateLocal}}
|
||||
{{#if showCreateForm}}
|
||||
<div>
|
||||
<form>
|
||||
<table>
|
||||
|
@ -73,7 +75,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if canCreateLocal}}
|
||||
{{#if showCreateForm}}
|
||||
<div class="modal-footer">
|
||||
{{#if tosAcceptRequired}}
|
||||
<div class="tos-agree">
|
||||
|
|
Loading…
Reference in a new issue