summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions/show.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'engines/billing/app/views/subscriptions/show.html.haml')
-rw-r--r--engines/billing/app/views/subscriptions/show.html.haml26
1 files changed, 19 insertions, 7 deletions
diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show.html.haml
index 246ebf0..45c54cc 100644
--- a/engines/billing/app/views/subscriptions/show.html.haml
+++ b/engines/billing/app/views/subscriptions/show.html.haml
@@ -1,7 +1,19 @@
-%h1
- - if @subscription.status == 'Active'
- Current
- Subscription
-= render :partial => "subscription_details", :locals => {:subscription => @subscription}
-- if allow_cancel_subscription(@subscription)
- = destroy_btn :cancel_subscription, user_subscription_path(@user, @subscription.id), type: 'danger'
+%script{:src => "https://js.braintreegateway.com/v2/braintree.js"}
+%h2.mbs
+ = t(:new_subs)
+= simple_form_for :subscription, :url => subscribe_subscription_path(@plan.id), :id => "checkout-form" do |f|
+ - if current_user and !current_user.has_payment_info?
+ = render 'customer_form'
+ %br/
+ %p
+ =t(:pay_details)
+ #payment-form
+ #coinbase-container-id
+ .form-actions
+ = f.submit t(:subscribe), :class => 'btn btn-primary'
+ :javascript
+ var clientToken = "#{@client_token}";
+ braintree.setup(clientToken, "dropin", {
+ container: "payment-form",
+ coinbase: { container: "coinbase-container-id" }
+ });