summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/site/EditSubscriptionModal.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/ui/site/EditSubscriptionModal.js')
-rw-r--r--public/assets/javascripts/ui/site/EditSubscriptionModal.js11
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
}