diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-01-30 17:27:31 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-01-30 17:48:38 -0500 |
| commit | 5bfdedf2b92728dcead42e2ddd2b2e07311231ce (patch) | |
| tree | 69f18358ada72d11ea8bf771478eaa758b8d6bd6 /public/assets/javascripts/ui/site/EditSubscriptionModal.js | |
| parent | d86d15c60c06843f8f22cdcf5b809c3a48e6a628 (diff) | |
inject brochure page onto billing if on free plan
Diffstat (limited to 'public/assets/javascripts/ui/site/EditSubscriptionModal.js')
| -rw-r--r-- | public/assets/javascripts/ui/site/EditSubscriptionModal.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/public/assets/javascripts/ui/site/EditSubscriptionModal.js b/public/assets/javascripts/ui/site/EditSubscriptionModal.js index d5eb9ac..e7e1fa5 100644 --- a/public/assets/javascripts/ui/site/EditSubscriptionModal.js +++ b/public/assets/javascripts/ui/site/EditSubscriptionModal.js @@ -17,12 +17,13 @@ var EditSubscriptionModal = ModalFormView.extend({ // this.parent = opt.parent this.__super__.initialize.call(this) - this.$freePlan = this.$("#free_plan") - this.$paidPlan = this.$("#paid_plan") + this.$freePlan = this.$(".freePlan") + this.$paidPlan = this.$(".paidPlan") this.$planRow = this.$(".planRow") this.$basicLayoutRow = this.$(".basicLayoutRow") this.$proLayoutRow = this.$(".proLayoutRow") this.$totalRow = this.$(".totalRow") + this.$planList = this.$(".planList") this.$billingInterval = this.$("[data-role=billingInterval]") @@ -71,11 +72,15 @@ var EditSubscriptionModal = ModalFormView.extend({ return this.show() }, + show: function(){ if (! this.subscriber) { this.$freePlan.show() this.$paidPlan.hide() - this.__super__.show.call(this) + this.$planList.load("/partials/plans", function(){ + this.$(".free_plan_info").remove() + this.__super__.show.call(this) + }.bind(this)) return } |
