mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 12:11:16 -05:00
Add spinners to login and signup forms
This commit is contained in:
parent
25caec0e62
commit
17f23adb78
5 changed files with 23 additions and 2 deletions
|
@ -31,6 +31,9 @@ Discourse.LoginController = Discourse.Controller.extend(Discourse.ModalFunctiona
|
||||||
return this.get('loggingIn') || this.blank('loginName') || this.blank('loginPassword');
|
return this.get('loggingIn') || this.blank('loginName') || this.blank('loginPassword');
|
||||||
}.property('loginName', 'loginPassword', 'loggingIn'),
|
}.property('loginName', 'loginPassword', 'loggingIn'),
|
||||||
|
|
||||||
|
showSignupLink: function() {
|
||||||
|
return !Discourse.SiteSettings.invite_only && !this.get('loggingIn');
|
||||||
|
}.property('loggingIn'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
login: function() {
|
login: function() {
|
||||||
|
|
|
@ -68,5 +68,8 @@
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class='btn btn-large btn-primary' {{bindAttr disabled="submitDisabled"}} {{action createAccount}}>{{i18n create_account.title}}</button>
|
<button class='btn btn-large btn-primary' {{bindAttr disabled="submitDisabled"}} {{action createAccount}}>{{i18n create_account.title}}</button>
|
||||||
|
{{#if formSubmitted}}
|
||||||
|
<i class='fa fa-spinner fa-spin'></i>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
|
@ -51,11 +51,15 @@
|
||||||
<i class="fa fa-unlock"></i> {{loginButtonText}}
|
<i class="fa fa-unlock"></i> {{loginButtonText}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{#unless Discourse.SiteSettings.invite_only}}
|
{{#if showSignupLink}}
|
||||||
{{i18n create_account.invite}}
|
{{i18n create_account.invite}}
|
||||||
<a id="new-account-link" {{action showCreateAccount}}>
|
<a id="new-account-link" {{action showCreateAccount}}>
|
||||||
{{i18n create_account.action}}
|
{{i18n create_account.action}}
|
||||||
</a>
|
</a>
|
||||||
{{/unless}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if loggingIn}}
|
||||||
|
<i class='fa fa-spinner fa-spin'></i>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
Discourse.LoginView = Discourse.ModalBodyView.extend({
|
Discourse.LoginView = Discourse.ModalBodyView.extend({
|
||||||
templateName: 'modal/login',
|
templateName: 'modal/login',
|
||||||
title: I18n.t('login.title'),
|
title: I18n.t('login.title'),
|
||||||
|
classNames: ['login-modal'],
|
||||||
|
|
||||||
|
|
||||||
mouseMove: function(e) {
|
mouseMove: function(e) {
|
||||||
|
|
|
@ -19,6 +19,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-modal {
|
||||||
|
.fa-spinner {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create account
|
// Create account
|
||||||
|
|
||||||
#new-account-link {
|
#new-account-link {
|
||||||
|
@ -46,4 +52,8 @@
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fa-spinner {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue