summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions
diff options
context:
space:
mode:
Diffstat (limited to 'engines/billing/app/views/subscriptions')
-rw-r--r--engines/billing/app/views/subscriptions/index.html.erb23
-rw-r--r--engines/billing/app/views/subscriptions/index2.html.haml (renamed from engines/billing/app/views/subscriptions/index.html.haml)0
-rw-r--r--engines/billing/app/views/subscriptions/new.html.erb43
-rw-r--r--engines/billing/app/views/subscriptions/show2.html.haml (renamed from engines/billing/app/views/subscriptions/show.html.haml)0
4 files changed, 23 insertions, 43 deletions
diff --git a/engines/billing/app/views/subscriptions/index.html.erb b/engines/billing/app/views/subscriptions/index.html.erb
new file mode 100644
index 0000000..b47fae6
--- /dev/null
+++ b/engines/billing/app/views/subscriptions/index.html.erb
@@ -0,0 +1,23 @@
+<h2 class="mbs">Subscriptions</h2>
+<br>
+<br>
+<p>Choose subcription:</p>
+<br>
+<ul class="nav nav-tabs nav-stacked">
+ <% @subscriptions.each do |subscription| %>
+ <li>
+ <div class="btn-group">
+ <button class="btn"> <%= subscription.name %>
+ <%= subscription.price %> </button>
+ </div>
+ <div>
+ <%=link_to "Checkout", :show_subscription, class: "button" %>
+ </div>
+ </li>
+ <% end %>
+</ul>
+
+
+
+
+
diff --git a/engines/billing/app/views/subscriptions/index.html.haml b/engines/billing/app/views/subscriptions/index2.html.haml
index 1e3fb25..1e3fb25 100644
--- a/engines/billing/app/views/subscriptions/index.html.haml
+++ b/engines/billing/app/views/subscriptions/index2.html.haml
diff --git a/engines/billing/app/views/subscriptions/new.html.erb b/engines/billing/app/views/subscriptions/new.html.erb
deleted file mode 100644
index 2336981..0000000
--- a/engines/billing/app/views/subscriptions/new.html.erb
+++ /dev/null
@@ -1,43 +0,0 @@
-<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
-<h2 class="mbs">Subscriptions</h2>
-<br>
-<%= form_tag subscriptions_path, id: "checkout-form" do %>
- <% if current_user and !current_user.has_payment_info? %>
- <%= render 'customer_form' %>
- <% end %>
-<br>
-<p>Choose subcription:</p>
-<br>
-<ul class="nav nav-tabs nav-stacked">
- <% @subscriptions.each do |subscription| %>
- <li>
- <div class="btn-group">
- <button class="btn"> <%= subscription.name %>
- <%= subscription.price %> </button>
- </div>
- <br>
- <br>
- <%= simple_form_for :subscription, :url => :subscriptions, :id => "checkout-form-#{subscription.id}" do |f| %>
- <input type="hidden" name="plan_id" id="" value="<%= subscription.id%>" />
- <div id="payment-form-<%= subscription.id%>"></div>
- <div class="form-actions">
- <%= f.submit t(:subscribe), :class => 'btn btn-primary' %>
- </div>
- <script type="text/javascript" charset="utf-8">
- var clientToken = "<%= @client_token %>";
- braintree.setup(clientToken, "dropin", {
- container: "payment-form-<%= subscription.id%>",
- coinbase: { container: "coinbase-container-id" }
- });
- </script>
- <% end %>
- </li>
- <% end %>
-</ul>
-<div id="payment-form"></div>
-<div id='coinbase-container-id'></div>
-<% end %>
-
-
-
-
diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show2.html.haml
index 246ebf0..246ebf0 100644
--- a/engines/billing/app/views/subscriptions/show.html.haml
+++ b/engines/billing/app/views/subscriptions/show2.html.haml