From ec6ad6772b6fe2779bd3336a50f69ad152640e24 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 30 May 2017 17:25:36 +0200 Subject: [PATCH] send feedback on donation --- www/common/toolbar2.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/www/common/toolbar2.js b/www/common/toolbar2.js index 127fce91d..382b2de91 100644 --- a/www/common/toolbar2.js +++ b/www/common/toolbar2.js @@ -702,14 +702,22 @@ define([ if (Cryptpad.account.plan) { return; } var text; + var feedback; if (ApiConfig.allowSubscriptions && Cryptpad.isLoggedIn()) { text = Messages.upgradeAccount; - } else { text = Messages.supportCryptpad; } + feedback = "UPGRADE_ACCOUNT"; + } else { + text = Messages.supportCryptpad; + feedback = "SUPPORT_CRYPTPAD"; + } var $upgrade = toolbar.$top.find('.' + UPGRADE_CLS).attr({ 'title': Messages.supportCryptpad }).text(text).show() - .click(function () { window.open(Cryptpad.donateURL,'_blank'); }); + .click(function () { + Cryptpad.feedback(feedback); + window.open(Cryptpad.donateURL,'_blank'); + }); return $upgrade; };