From 49d2bd981aa0f8252ff8820adb277dae4b750384 Mon Sep 17 00:00:00 2001 From: Graham Dixon Date: Mon, 15 Mar 2021 14:28:05 +0000 Subject: [PATCH] Opens twitter share in a new tab and ensures trust-bonus always opens (on thanks-modal close) (#8566) --- app/assets/v2/js/grants/contribution-trust-bonus.js | 2 +- app/assets/v2/js/grants/grant-thanks-modal.js | 5 ++++- app/retail/templates/shared/contribution_trust_bonus.html | 2 +- app/retail/templates/shared/grant_thanks_modal.html | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/v2/js/grants/contribution-trust-bonus.js b/app/assets/v2/js/grants/contribution-trust-bonus.js index eaec2383733..1666ee070a0 100644 --- a/app/assets/v2/js/grants/contribution-trust-bonus.js +++ b/app/assets/v2/js/grants/contribution-trust-bonus.js @@ -13,7 +13,7 @@ Vue.component('contribution-trust-bonus', { close() { this.$bvModal.hide(this.modalId); }, - goToTrustBonus() { + openProfileTrustBonus() { document.location = '/profile/trust'; } } diff --git a/app/assets/v2/js/grants/grant-thanks-modal.js b/app/assets/v2/js/grants/grant-thanks-modal.js index a8762ce2af7..9814050ea8e 100644 --- a/app/assets/v2/js/grants/grant-thanks-modal.js +++ b/app/assets/v2/js/grants/grant-thanks-modal.js @@ -33,13 +33,16 @@ Vue.component('contribution-thanks-modal', { methods: { close() { this.$bvModal.hide(this.modalId); - this.$bvModal.show('trust-bonus'); }, handleHide() { CartData.clearCheckedOut(); + this.$bvModal.show('trust-bonus'); }, showSaveAsCollection() { this.$bvModal.show('create-collection'); + }, + shareOnTwitter() { + window.open(this.tweetUrl, '_blank'); } } }); diff --git a/app/retail/templates/shared/contribution_trust_bonus.html b/app/retail/templates/shared/contribution_trust_bonus.html index 79ea333bce6..48e0c03cf3c 100644 --- a/app/retail/templates/shared/contribution_trust_bonus.html +++ b/app/retail/templates/shared/contribution_trust_bonus.html @@ -44,7 +44,7 @@

Increase your QF matching by up to 25% Verify Profile diff --git a/app/retail/templates/shared/grant_thanks_modal.html b/app/retail/templates/shared/grant_thanks_modal.html index 6fcfdbdac6f..6308f9e0ae2 100644 --- a/app/retail/templates/shared/grant_thanks_modal.html +++ b/app/retail/templates/shared/grant_thanks_modal.html @@ -62,7 +62,7 @@

Thank you for your contribution!

Share on Twitter