diff --git a/app/assets/javascripts/admin/components/cancel-link.js.es6 b/app/assets/javascripts/admin/components/cancel-link.js.es6 new file mode 100644 index 00000000000..9250c1ae73b --- /dev/null +++ b/app/assets/javascripts/admin/components/cancel-link.js.es6 @@ -0,0 +1,3 @@ +export default Ember.Component.extend({ + tagName: '' +}); diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 index d8c54177d43..a89a97d4123 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 @@ -40,9 +40,9 @@ export default Ember.Controller.extend(CanCheckEmails, PreferencesTabController, return !this.siteSettings.enable_sso && this.siteSettings.enable_local_logins; }, - @computed("model.second_factor_enabled") - secondFactorStatusClass(secondFactorEnabled) { - return secondFactorEnabled ? 'tip good' : 'tip bad'; + @computed + showTwoFactorModalText() { + return I18n.t('user.second_factor.title').toLowerCase(); }, actions: { diff --git a/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 index f09263712d9..bdaab628cd9 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/second-factor.js.es6 @@ -18,7 +18,17 @@ export default Ember.Controller.extend({ @computed('loading') submitButtonText(loading) { - return loading ? 'loading' : 'submit'; + return loading ? 'loading' : 'continue'; + }, + + @computed('loading') + enableButtonText(loading) { + return loading ? 'loading' : 'enable'; + }, + + @computed('loading') + disableButtonText(loading) { + return loading ? 'loading' : 'disable'; }, @computed diff --git a/app/assets/javascripts/discourse/templates/components/cancel-link.hbs b/app/assets/javascripts/discourse/templates/components/cancel-link.hbs new file mode 100644 index 00000000000..8c3a3cb4c7e --- /dev/null +++ b/app/assets/javascripts/discourse/templates/components/cancel-link.hbs @@ -0,0 +1,3 @@ +{{#link-to route args}} + {{i18n 'cancel'}} +{{/link-to}} diff --git a/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs b/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs index d8c58a6ff85..6621b7e2a7a 100644 --- a/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs +++ b/app/assets/javascripts/discourse/templates/preferences-second-factor.hbs @@ -15,7 +15,7 @@ {{/if}} {{#if model.second_factor_enabled}} - +