FIX: replace reference to Google_oauth2 with Google during signup

This commit is contained in:
Neil Lalonde
2016-03-29 18:08:55 -04:00
parent 25235eca1c
commit 3e5f2bd1cf
2 changed files with 10 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
return Discourse.InputValidation.create({
ok: true,
reason: I18n.t('user.email.authenticated', {
provider: this.get('authOptions.auth_provider')
provider: this.authProviderDisplayName(this.get('authOptions.auth_provider'))
})
});
}
@@ -133,6 +133,13 @@ export default Ember.Controller.extend(ModalFunctionality, {
return this.get('authOptions.email') === this.get("accountEmail") && this.get('authOptions.email_valid');
}.property('accountEmail', 'authOptions.email', 'authOptions.email_valid'),
authProviderDisplayName(provider) {
switch(provider) {
case "Google_oauth2": return "Google";
default: return provider;
}
},
prefillUsername: function() {
if (this.get('prefilledUsername')) {
// If username field has been filled automatically, and email field just changed,