diff --git a/app/assets/javascripts/discourse/controllers/invite.js.es6 b/app/assets/javascripts/discourse/controllers/invite.js.es6 index d22217b567f..fe6c83af41a 100644 --- a/app/assets/javascripts/discourse/controllers/invite.js.es6 +++ b/app/assets/javascripts/discourse/controllers/invite.js.es6 @@ -6,6 +6,7 @@ export default Ember.Controller.extend(ModalFunctionality, { // If this isn't defined, it will proxy to the user model on the preferences // page which is wrong. emailOrUsername: null, + inviteIcon: "envelope", isAdmin: function(){ return Discourse.User.currentProp("admin"); @@ -88,8 +89,10 @@ export default Ember.Controller.extend(ModalFunctionality, { if (Ember.isEmpty(this.get('emailOrUsername'))) { return I18n.t('topic.invite_reply.to_topic_blank'); } else if (Discourse.Utilities.emailValid(this.get('emailOrUsername'))) { + this.set("inviteIcon", "envelope"); return I18n.t('topic.invite_reply.to_topic_email'); } else { + this.set("inviteIcon", "hand-o-right"); return I18n.t('topic.invite_reply.to_topic_username'); } } diff --git a/app/assets/javascripts/discourse/templates/modal/invite.hbs b/app/assets/javascripts/discourse/templates/modal/invite.hbs index a5ccb897f10..0a016002d65 100644 --- a/app/assets/javascripts/discourse/templates/modal/invite.hbs +++ b/app/assets/javascripts/discourse/templates/modal/invite.hbs @@ -28,7 +28,7 @@ {{#if model.finished}} {{d-button class="btn-primary" action="closeModal" label="close"}} {{else}} - {{d-button icon="envelope" action="createInvite" class="btn-primary" disabled=disabled label=buttonTitle}} + {{d-button icon=inviteIcon action="createInvite" class="btn-primary" disabled=disabled label=buttonTitle}} {{#if showCopyInviteButton}} {{d-button icon="link" action="generateInvitelink" class="btn-primary" disabled=disabledCopyLink label='user.invited.generate_link'}} {{/if}}