summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions/new12.html.haml
diff options
context:
space:
mode:
authorclaucece <soficeli0@gmail.com>2015-09-22 10:48:14 -0500
committerclaucece <soficeli0@gmail.com>2015-10-05 22:39:31 -0500
commitc10bbfa44442c86fda82c16524341d5f21b63664 (patch)
treee406e181bc5ff74cc9462e3dd707003ecee00e93 /engines/billing/app/views/subscriptions/new12.html.haml
parent2e1d21f53f0f96fba544b592fde84af2f4879a24 (diff)
subscriptions, translation
Diffstat (limited to 'engines/billing/app/views/subscriptions/new12.html.haml')
-rw-r--r--engines/billing/app/views/subscriptions/new12.html.haml27
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/billing/app/views/subscriptions/new12.html.haml b/engines/billing/app/views/subscriptions/new12.html.haml
new file mode 100644
index 0000000..8b302f2
--- /dev/null
+++ b/engines/billing/app/views/subscriptions/new12.html.haml
@@ -0,0 +1,27 @@
+%script{:src => "https://js.braintreegateway.com/v2/braintree.js"}
+%h2.mbs Subscriptions
+%br/
+= form_tag subscriptions_path, id: "checkout-form" do
+ - if current_user and !current_user.has_payment_info?
+ = render 'customer_form'
+ %br/
+ %p Choose subcription:
+ %ul
+ - @subscriptions.each do |subscription|
+ %li
+ = subscription.name
+ = subscription.price
+ = simple_form_for :subscription, :url => :subscriptions, :id => "checkout-form-#{subscription.id}" do |f|
+ %input{:id => "", :name => "plan_id", :type => "hidden", :value => subscription.id}
+ %div{:id => "payment-form-#{subscription.id}"}
+ .form-actions
+ = f.submit t(:subscribe), :class => 'btn btn-primary'
+ %script{:charset => "utf-8", :type => "text/javascript"}
+ :cdata
+ var clientToken = "#{@client_token}";
+ braintree.setup(clientToken, "dropin", {
+ container: "payment-form-#{subscription.id}",
+ coinbase: { container: "coinbase-container-id" }
+ });
+#payment-form
+#coinbase-container-id