From f3c973b9452c718dc458d3ac9dc23c289ff1259c Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Tue, 7 Apr 2015 15:54:55 -0700 Subject: [PATCH] Add payment methods to subscribe dialog And update level counts in subscription breakdown. --- app/locale/en.coffee | 8 ++++++-- app/styles/modal/subscribe-modal.sass | 14 ++++++++++++++ app/templates/core/subscribe-modal.jade | 1 + app/views/core/SubscribeModal.coffee | 16 ++++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index a9a1ade24..d3ac1da3f 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -399,9 +399,9 @@ subscribe: comparison_blurb: "Sharpen your skills with a CodeCombat subscription!" - feature1: "60+ basic levels across 4 worlds" + feature1: "80+ basic levels across 4 worlds" # {change} feature2: "7 powerful new heroes with unique skills!" - feature3: "30+ bonus levels" + feature3: "50+ bonus levels" # {change} feature4: "3500 bonus gems every month!" feature5: "Video tutorials" feature6: "Premium email support" @@ -429,6 +429,10 @@ parents_blurb1: "With CodeCombat, your child learns by writing real code. They start by learning simple commands, and progress to more advanced topics." parents_blurb2: "For $9.99 USD/mo, they get new challenges every week and personal email support from professional programmers." parents_blurb3: "No Risk: 100% money back guarantee, easy 1-click unsubscribe." + payment_methods: "Payment Methods" + payment_methods_title: "Accepted Payment Methods" + payment_methods_blurb1: "We currently accept credit cards, Alipay, and bitcoins." + payment_methods_blurb2: "If you require an alternate form of payment, please contact" stripe_description: "Monthly Subscription" subscription_required_to_play: "You'll need a subscription to play this level." unlock_help_videos: "Subscribe to unlock all video tutorials." diff --git a/app/styles/modal/subscribe-modal.sass b/app/styles/modal/subscribe-modal.sass index 0f33abe56..7ea1cfab9 100644 --- a/app/styles/modal/subscribe-modal.sass +++ b/app/styles/modal/subscribe-modal.sass @@ -118,6 +118,20 @@ font-family: $headings-font-family font-size: 18px + //- Payment methods info popover link + + #payment-methods-info + position: absolute + right: 38px + top: 389px + text-decoration: underline + cursor: pointer + font-weight: bold + line-height: 18px + color: black + font-family: $headings-font-family + font-size: 18px + //- Purchase button .purchase-button diff --git a/app/templates/core/subscribe-modal.jade b/app/templates/core/subscribe-modal.jade index 99d07ed6c..7fc061285 100644 --- a/app/templates/core/subscribe-modal.jade +++ b/app/templates/core/subscribe-modal.jade @@ -71,6 +71,7 @@ td.center-ok span.glyphicon.glyphicon-ok #parents-info(data-i18n="subscribe.parents") + #payment-methods-info(data-i18n="subscribe.payment_methods") button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_title") button.btn.btn-lg.btn-illustrated.parent-button(data-i18n="subscribe.parent_button") diff --git a/app/views/core/SubscribeModal.coffee b/app/views/core/SubscribeModal.coffee index 547c5dd37..7d957abc5 100644 --- a/app/views/core/SubscribeModal.coffee +++ b/app/views/core/SubscribeModal.coffee @@ -37,6 +37,7 @@ module.exports = class SubscribeModal extends ModalView super() @setupParentButtonPopover() @setupParentInfoPopover() + @setupPaymentMethodsInfoPopover() setupParentButtonPopover: -> popoverTitle = $.i18n.t 'subscribe.parent_email_title' @@ -85,6 +86,21 @@ module.exports = class SubscribeModal extends ModalView ).on 'shown.bs.popover', => application.tracker?.trackEvent 'Subscription parent hover' + setupPaymentMethodsInfoPopover: -> + popoverTitle = $.i18n.t('subscribe.payment_methods_title') + popoverContent = "

" + $.i18n.t('subscribe.payment_methods_blurb1') + "

" + popoverContent += "

" + $.i18n.t('subscribe.payment_methods_blurb2') + " support@codecombat.com." + @$el.find('#payment-methods-info').popover( + animation: true + html: true + placement: 'top' + trigger: 'click' + title: popoverTitle + content: popoverContent + container: @$el + ).on 'shown.bs.popover', => + application.tracker?.trackEvent 'Subscription payment methods hover' + onClickParentSendButton: (e) -> # TODO: Popover sometimes dismisses immediately after send