diff --git a/app/assets/javascripts/discourse/app/controllers/create-invite.js b/app/assets/javascripts/discourse/app/controllers/create-invite.js index 1a5c137deb0..394ffc24ae3 100644 --- a/app/assets/javascripts/discourse/app/controllers/create-invite.js +++ b/app/assets/javascripts/discourse/app/controllers/create-invite.js @@ -146,8 +146,13 @@ export default Controller.extend( }, @action - mutAutogenerated(value) { - this.setAutogenerated(value); + copied() { + this.appEvents.trigger("modal-body:flash", { + text: I18n.t("user.invited.invite.invite_copied"), + messageClass: "success", + }); + + this.setAutogenerated(false); }, @action diff --git a/app/assets/javascripts/discourse/app/templates/modal/create-invite.hbs b/app/assets/javascripts/discourse/app/templates/modal/create-invite.hbs index 0c708b83887..6b5526832db 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/create-invite.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/create-invite.hbs @@ -6,7 +6,7 @@ class="invite-link" value=invite.link readonly=true}} - {{copy-button selector="input.invite-link" copied=(action "mutAutogenerated" false)}} + {{copy-button selector="input.invite-link" copied=(action "copied")}}
{{i18n "user.invited.invite.expires_at_time" time=expiresAtRelative}}
@@ -98,16 +98,6 @@ {{/d-modal-body}}