summaryrefslogtreecommitdiff
path: root/engines/billing/app/views
diff options
context:
space:
mode:
authorclaucece <soficeli0@gmail.com>2015-09-27 23:04:55 -0500
committerclaucece <soficeli0@gmail.com>2015-10-05 22:41:21 -0500
commit6c4f02fd2d530c28899561fac40ca76075975dc8 (patch)
tree575f0aa91e189a6894f3bd1bce7fb5e83f02a6f7 /engines/billing/app/views
parentb26d10fe7d87b570bd888fa2a2543f3675278f8b (diff)
update to haml, created translations, deleted files
Diffstat (limited to 'engines/billing/app/views')
-rw-r--r--engines/billing/app/views/billing_admin/show.html.haml6
-rw-r--r--engines/billing/app/views/credit_card_info/confirm.html.haml5
-rw-r--r--engines/billing/app/views/credit_card_info/edit.html.haml16
-rw-r--r--engines/billing/app/views/customer/_customer_data.html.haml16
-rw-r--r--engines/billing/app/views/customer/_subs_form.html.haml10
-rw-r--r--engines/billing/app/views/customer/_transaction.html.haml0
-rw-r--r--engines/billing/app/views/customer/confirm.html.haml14
-rw-r--r--engines/billing/app/views/customer/edit.html.haml23
-rw-r--r--engines/billing/app/views/customer/new.html.haml20
-rw-r--r--engines/billing/app/views/customer/show.html.haml27
-rw-r--r--engines/billing/app/views/payments/_customer_form.html.haml8
-rw-r--r--engines/billing/app/views/payments/_non_customer_fields.html.haml16
-rw-r--r--engines/billing/app/views/payments/_transaction_details.html.haml15
-rw-r--r--engines/billing/app/views/payments/confirm.html.haml26
-rw-r--r--engines/billing/app/views/payments/default.html.erb27
-rw-r--r--engines/billing/app/views/payments/index.html.haml3
-rw-r--r--engines/billing/app/views/subscriptions/_customer_form.html.erb13
-rw-r--r--engines/billing/app/views/subscriptions/_customer_form.html.haml10
-rw-r--r--engines/billing/app/views/subscriptions/_subscription_details.html.haml3
-rw-r--r--engines/billing/app/views/subscriptions/create.html.haml9
-rw-r--r--engines/billing/app/views/subscriptions/destroy.html.haml7
-rw-r--r--engines/billing/app/views/subscriptions/index.html.erb35
-rw-r--r--engines/billing/app/views/subscriptions/index.html.haml29
-rw-r--r--engines/billing/app/views/subscriptions/index2.html.haml8
-rw-r--r--engines/billing/app/views/subscriptions/new12.html.haml27
-rw-r--r--engines/billing/app/views/subscriptions/show.html.erb22
-rw-r--r--engines/billing/app/views/subscriptions/show.html.haml19
-rw-r--r--engines/billing/app/views/subscriptions/show2.html.haml7
28 files changed, 70 insertions, 351 deletions
diff --git a/engines/billing/app/views/billing_admin/show.html.haml b/engines/billing/app/views/billing_admin/show.html.haml
index 0382cf0..11f3928 100644
--- a/engines/billing/app/views/billing_admin/show.html.haml
+++ b/engines/billing/app/views/billing_admin/show.html.haml
@@ -1,7 +1,9 @@
+/ same concern as in controller
%legend= t(:more_than_90_days_past_due)
= render(:partial => "subscriptions/subscription_details", :collection => @past_due_atleast_90_days, :as => 'subscription', :locals => {:show_user => true}) || t(:none)
%legend= t(:all_past_due)
= render(:partial => "subscriptions/subscription_details", :collection => @all_past_due, :as => 'subscription', :locals => {:show_user => true}) || t(:none)
-%legend= t(:your_settings)
-= link_to 'view own billing settings', show_or_new_customer_link(current_user) \ No newline at end of file
+/needed?
+/%legend= t(:your_settings)
+/= link_to 'view own billing settings', show_or_new_customer_link(current_user)
diff --git a/engines/billing/app/views/credit_card_info/confirm.html.haml b/engines/billing/app/views/credit_card_info/confirm.html.haml
deleted file mode 100644
index 9dd8176..0000000
--- a/engines/billing/app/views/credit_card_info/confirm.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%h1 Payment Info Confirmation
-%p Your payment information was successfully saved.
-%dl
- %dt Credit Card
- %dd= @result.credit_card.masked_number
diff --git a/engines/billing/app/views/credit_card_info/edit.html.haml b/engines/billing/app/views/credit_card_info/edit.html.haml
deleted file mode 100644
index 9e44344..0000000
--- a/engines/billing/app/views/credit_card_info/edit.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%h1 Change Credit Card
-- if @result
- #total-errors{:style => "color:red;"}
- = h(@result.errors.size)
- error(s)
-= braintree_form_for :credit_card, :existing => @credit_card do |f|
- = field_set_tag "Credit Card" do
- %dl
- %dt= f.label :number, 'Number'
- %dd= f.text_field :number
- %dt= f.label :expiration_date, 'Expiration Date (MM/YY)'
- %dd= f.text_field :expiration_date
- %dt= f.label :cvv, 'CVV'
- %dd= f.text_field :cvv
- = hidden_field_tag :tr_data, @tr_data
- = f.button :wrapped, 'Save Payment Info', cancel: edit_customer_path(@user.id)
diff --git a/engines/billing/app/views/customer/_customer_data.html.haml b/engines/billing/app/views/customer/_customer_data.html.haml
deleted file mode 100644
index 439ae5c..0000000
--- a/engines/billing/app/views/customer/_customer_data.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%legend= t(:customer_information)
-%dl
- %dt First Name
- %dd= @customer.first_name
- %dt Last Name
- %dd= @customer.last_name
- %dt Phone
- %dd= @customer.phone
-%legend= t(:credit_card_information)
-%dl
- %dt Number
- %dd= @default_cc.masked_number
- %dt Expiration Date
- %dd= @default_cc.expiration_date
- - if current_user == @user
- = btn t(:edit_saved_data), edit_customer_path(@user.id)
diff --git a/engines/billing/app/views/customer/_subs_form.html.haml b/engines/billing/app/views/customer/_subs_form.html.haml
deleted file mode 100644
index 82828cd..0000000
--- a/engines/billing/app/views/customer/_subs_form.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-%p
- = t(:personal_info)
-%div
- = text_field_tag :first_name, "",placeholder: "First Name", class: "radius"
-%div
- = text_field_tag :last_name, "",placeholder: "Last Name", class: "radius"
-%div
- = text_field_tag :company, "",placeholder: "Company", class: "radius"
-%div
- = text_field_tag :phone, "",placeholder: "Phone", class: "radius"
diff --git a/engines/billing/app/views/customer/_transaction.html.haml b/engines/billing/app/views/customer/_transaction.html.haml
deleted file mode 100644
index e69de29..0000000
--- a/engines/billing/app/views/customer/_transaction.html.haml
+++ /dev/null
diff --git a/engines/billing/app/views/customer/confirm.html.haml b/engines/billing/app/views/customer/confirm.html.haml
deleted file mode 100644
index eab9616..0000000
--- a/engines/billing/app/views/customer/confirm.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-%h1 Payment Info Confirmation
-%p Your payment information was successfully saved.
-%dl
- %dt First Name
- %dd= @result.customer.first_name
- %dt Last Name
- %dd= @result.customer.last_name
- %dt Phone
- %dd= @result.customer.phone
- %dt Credit Card
- - @result.customer.credit_cards.each do |cc|
- %dd= cc.masked_number
-- customer = Customer.find_by_user_id(@user.id)
-= btn 'View Customer Info', show_customer_path(@user.id)
diff --git a/engines/billing/app/views/customer/edit.html.haml b/engines/billing/app/views/customer/edit.html.haml
deleted file mode 100644
index f461fcc..0000000
--- a/engines/billing/app/views/customer/edit.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-- if @result
- #total-errors{:style => "color:red;"}
- = h(@result.errors.size)
- error(s)
-= braintree_form_for :customer, existing: @customer do |f|
- = field_set_tag "Customer" do
- %dl
- %dt= f.label :first_name, 'First Name'
- %dd= f.text_field :first_name
- %dt= f.label :last_name, 'Last Name'
- %dd= f.text_field :last_name
- %dt= f.label :phone, 'Phone'
- %dd= f.text_field :phone
- - if @default_cc
- = # todo, as they will need a credit card, so not sure about conditional?
- %dt= t(:stored_credit_card)
- %dd
- = @default_cc.masked_number
- = btn t(:change_credit_card), edit_credit_card_info_path(:id => @default_cc.token)
- = hidden_field_tag :tr_data, @tr_data
- .form-actions
- = f.submit t(:save_customer_info), :class => 'btn btn-primary'
- = btn t(:cancel), show_customer_path(@user)
diff --git a/engines/billing/app/views/customer/new.html.haml b/engines/billing/app/views/customer/new.html.haml
deleted file mode 100644
index 81185e4..0000000
--- a/engines/billing/app/views/customer/new.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-%h2.mbs New Customer
-%br/
-= form_tag new_customer_path, id: "checkout-form" do
- - if current_user and !current_user.has_payment_info?
- = render 'subs_form' unless current_user.is_anonymous?
- %br/
- %p
- = t(:donation_info)
- %div{:id => "payment-form" }
- %div{:id => "coinbase-container-id" }
- %input{:name => "amount", :placeholder => "Enter amount", :type => "text"}
- %input.btn.btn-primary{:type => "submit", :value => "Donate"}
-%script{:src => "https://js.braintreegateway.com/v2/braintree.js"}
-:javascript
- var clientToken = "#{@client_token}";
- braintree.setup(clientToken, "dropin", {
- container: "payment-form",
- form: "checkout-form",
- coinbase: { container: "coinbase-container-id" }
- });
diff --git a/engines/billing/app/views/customer/show.html.haml b/engines/billing/app/views/customer/show.html.haml
deleted file mode 100644
index ce4d01a..0000000
--- a/engines/billing/app/views/customer/show.html.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-- if admin? and !@customer
- = t(:no_saved_customer)
-- else
- = render :partial => 'customer_data'
- %legend= t(:last_three_transactions)
- - counter = 0
- = # these will be ordered with most recently created first, per http://stackoverflow.com/questions/16425475/
- - @transactions.each do |t|
- - break if counter > 2 # not ruby-like, but object is a Braintree::ResourceCollection so limited methods available
- = render :partial => "payments/transaction_details", :locals => {:transaction => t}
- - counter += 1
- = btn :transaction_history, user_payments_path(@user)
- %legend= t(:subscriptions)
- - if @active_subscription
- = render :partial => "subscriptions/subscription_details", :locals => {:subscription => @active_subscription}
- - else
- %p
- = t(:no_relevant_subscription)
- - if current_user == @user
- %p
- .form-actions
- = btn :subscribe_to_plan, new_subscription_path
- %p
- = link_to t(:all_subscriptions), user_subscriptions_path(@user)
-
-.form-actions
- = btn :make_donation, new_payment_path, :type => 'primary'
diff --git a/engines/billing/app/views/payments/_customer_form.html.haml b/engines/billing/app/views/payments/_customer_form.html.haml
index 82828cd..df61d3d 100644
--- a/engines/billing/app/views/payments/_customer_form.html.haml
+++ b/engines/billing/app/views/payments/_customer_form.html.haml
@@ -1,10 +1,10 @@
%p
= t(:personal_info)
%div
- = text_field_tag :first_name, "",placeholder: "First Name", class: "radius"
+ = text_field_tag :first_name, "",placeholder: "#{t(:first_name)}", class: "radius"
%div
- = text_field_tag :last_name, "",placeholder: "Last Name", class: "radius"
+ = text_field_tag :last_name, "",placeholder: "#{t(:last_name)}", class: "radius"
%div
- = text_field_tag :company, "",placeholder: "Company", class: "radius"
+ = text_field_tag :company, "",placeholder: "#{t(:company)}", class: "radius"
%div
- = text_field_tag :phone, "",placeholder: "Phone", class: "radius"
+ = text_field_tag :phone, "",placeholder: "#{t(:phone)}", class: "radius"
diff --git a/engines/billing/app/views/payments/_non_customer_fields.html.haml b/engines/billing/app/views/payments/_non_customer_fields.html.haml
deleted file mode 100644
index 77cfe95..0000000
--- a/engines/billing/app/views/payments/_non_customer_fields.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-= field_set_tag "Personal Information" do
- = f.fields_for :customer do |c|
- %div= c.label :first_name, "First Name"
- %div= c.text_field :first_name
- %div= c.label :last_name, "Last Name"
- %div= c.text_field :last_name
- %div= c.label :email, "Email"
- %div= c.text_field :email
-= field_set_tag "Credit Card" do
- = f.fields_for :credit_card do |c|
- %div= c.label :number, "Number"
- %div= c.text_field :number
- %div= c.label :expiration_date, "Expiration Date (MM/YY)"
- %div= c.text_field :expiration_date
- %div= c.label :cvv, "CVV"
- %div= c.text_field :cvv \ No newline at end of file
diff --git a/engines/billing/app/views/payments/_transaction_details.html.haml b/engines/billing/app/views/payments/_transaction_details.html.haml
deleted file mode 100644
index 85e4f6a..0000000
--- a/engines/billing/app/views/payments/_transaction_details.html.haml
+++ /dev/null
@@ -1,15 +0,0 @@
-%p
- = transaction.id
- Type:
- = transaction.type
- Amount:
- = number_to_currency(transaction.amount)
- Status:
- = transaction.status
- Date
- = transaction.created_at.strftime("%Y-%m-%d")
- - if sub_start = transaction.subscription_details.billing_period_start_date
- From subscription which started
- = sub_start
- - else # should not have any of these
- Not paid as part of subscription \ No newline at end of file
diff --git a/engines/billing/app/views/payments/confirm.html.haml b/engines/billing/app/views/payments/confirm.html.haml
deleted file mode 100644
index 45af3c9..0000000
--- a/engines/billing/app/views/payments/confirm.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-%h1 Payment Result
-%div Thank you for your donation.
-%h2 Transaction Details
-%table
- %tr
- %td Amount
- %td
- $#{@result.transaction.amount}
- %tr
- %td Transaction ID:
- %td= @result.transaction.id
- %tr
- %td First Name:
- %td= h @result.transaction.customer_details.first_name
- %tr
- %td Last Name:
- %td= h @result.transaction.customer_details.last_name
- %tr
- %td Email:
- %td= h @result.transaction.customer_details.email
- %tr
- %td Credit Card:
- %td= h @result.transaction.credit_card_details.masked_number
- %tr
- %td Card Type:
- %td= h @result.transaction.credit_card_details.card_type \ No newline at end of file
diff --git a/engines/billing/app/views/payments/default.html.erb b/engines/billing/app/views/payments/default.html.erb
deleted file mode 100644
index bbecf46..0000000
--- a/engines/billing/app/views/payments/default.html.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-<h2 class="mbs">New Donation</h2>
-<br>
-<%= form_tag confirm_payment_path, id: "checkout-form" do %>
- <% if current_user and !current_user.has_payment_info? %>
- <%= render 'customer_form' unless @anonymous_user%>
- <% end %>
-<br>
-<p>Please enter your donation details (this is a donation and will not be applied towards your account):</p>
-<div id="payment-form"></div>
-<div id='coinbase-container-id'></div>
-<input type="text" name="amount" placeholder="Enter amount">
-<input type="submit" class="btn btn-primary" value="Donate">
-<% end %>
-
-<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
-<script>
- // We generated a client token for you so you can test out this code
- // immediately. In a production-ready integration, you will need to
- // generate a client token on your server (see section below).
-var clientToken = "<%= @client_token %>";
-braintree.setup(clientToken, "dropin", {
- container: "payment-form",
- form: "checkout-form",
- coinbase: { container: "coinbase-container-id" }
-}
- );
-</script>
diff --git a/engines/billing/app/views/payments/index.html.haml b/engines/billing/app/views/payments/index.html.haml
index 7a89917..01aa660 100644
--- a/engines/billing/app/views/payments/index.html.haml
+++ b/engines/billing/app/views/payments/index.html.haml
@@ -1,5 +1,6 @@
+/ check if necessary
%h2=t :transaction_history
- if (@transactions.count == 0)
= t(:no_transaction_history)
- @transactions.each do |t|
- = render :partial => "transaction_details", :locals => {:transaction => t} \ No newline at end of file
+ = render :partial => "transaction_details", :locals => {:transaction => t}
diff --git a/engines/billing/app/views/subscriptions/_customer_form.html.erb b/engines/billing/app/views/subscriptions/_customer_form.html.erb
deleted file mode 100644
index 2e8a3b1..0000000
--- a/engines/billing/app/views/subscriptions/_customer_form.html.erb
+++ /dev/null
@@ -1,13 +0,0 @@
-<p>Please enter your personal info:</p>
-<div class="mb1">
- <%= text_field_tag :first_name, "",placeholder: "First Name", class: "radius" %>
-</div>
-<div class="mb1">
- <%= text_field_tag :last_name, "",placeholder: "Last Name", class: "radius" %>
-</div>
-<div class="mb1">
- <%= text_field_tag :company, "",placeholder: "Company", class: "radius" %>
-</div>
-<div class="mb1">
- <%= text_field_tag :phone, "",placeholder: "Phone", class: "radius" %>
-</div>
diff --git a/engines/billing/app/views/subscriptions/_customer_form.html.haml b/engines/billing/app/views/subscriptions/_customer_form.html.haml
new file mode 100644
index 0000000..70b9b97
--- /dev/null
+++ b/engines/billing/app/views/subscriptions/_customer_form.html.haml
@@ -0,0 +1,10 @@
+%p
+ = t(:personal_info)
+%div
+ = text_field_tag :first_name, "",placeholder: "#{t(:first_name)}", class: "radius"
+%div
+ = text_field_tag :last_name, "",placeholder: "#{t(:last_name)}", class: "radius"
+%div
+ = text_field_tag :company, "",placeholder: "#{t(:company)}", class: "radius"
+%div
+ = text_field_tag :phone, "",placeholder: "#{t(:phone)}", class: "radius"
diff --git a/engines/billing/app/views/subscriptions/_subscription_details.html.haml b/engines/billing/app/views/subscriptions/_subscription_details.html.haml
index 6145c95..e6cf87d 100644
--- a/engines/billing/app/views/subscriptions/_subscription_details.html.haml
+++ b/engines/billing/app/views/subscriptions/_subscription_details.html.haml
@@ -1,3 +1,4 @@
+/needed?
%p
- if local_assigns[:show_user]
User:
@@ -23,4 +24,4 @@
Status:
%font{:color => color}
= subscription.status
- - # would be good to get plan name but not sure if that is possible? \ No newline at end of file
+ - # would be good to get plan name but not sure if that is possible?
diff --git a/engines/billing/app/views/subscriptions/create.html.haml b/engines/billing/app/views/subscriptions/create.html.haml
deleted file mode 100644
index 2b6c5e9..0000000
--- a/engines/billing/app/views/subscriptions/create.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-- if @result.success?
- %h1
- Subscription Status
- = @result.subscription.status
- = render :partial => "subscription_details", :locals => {:subscription => @result.subscription}
-- else
- %h1
- Error:
- = @result.message \ No newline at end of file
diff --git a/engines/billing/app/views/subscriptions/destroy.html.haml b/engines/billing/app/views/subscriptions/destroy.html.haml
deleted file mode 100644
index e6e8578..0000000
--- a/engines/billing/app/views/subscriptions/destroy.html.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-- if @result.success?
- Subscription destroyed
-- else
- Error:
- = @result.message
-%p
- = btn 'Customer Information', show_customer_path(@user)
diff --git a/engines/billing/app/views/subscriptions/index.html.erb b/engines/billing/app/views/subscriptions/index.html.erb
deleted file mode 100644
index 688e371..0000000
--- a/engines/billing/app/views/subscriptions/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-<h2 class="mbs">Subscriptions</h2>
-<br>
-<h4><div id="last"> Lastest Subscriptions:</h4>
- <% if @user.subscription_id %>
- <ul>
- <% @subscription.transactions.each do |transaction| %>
- <li>
- Date: <%= transaction.created_at %>
- </li>
- <% end %>
- </ul>
- <ul>
- <%= link_to "Unsubscribe from #{@plan.name}", unsubscribe_subscription_path(@subscription.plan_id), method: :delete, class: "btn btn-danger" %>
- </ul>
-</div>
- <br>
- <% else %>
- <p> No subscriptions. </p>
- <br>
- <h4>Choose subcription:</h4>
- <br>
- <ul class="nav nav-tabs nav-stacked">
- <% @subscriptions.each do |subscription| %>
- <li>
- <div class="well">
- <%= subscription.name %>
- <%= subscription.price %>
- </div>
- <div>
- <%= link_to "Choose", subscription_path(subscription.id), class: "btn btn-info" %>
- </div> <br>
- </li>
- <% end %>
- <% end %>
-</ul>
diff --git a/engines/billing/app/views/subscriptions/index.html.haml b/engines/billing/app/views/subscriptions/index.html.haml
new file mode 100644
index 0000000..70fbf8d
--- /dev/null
+++ b/engines/billing/app/views/subscriptions/index.html.haml
@@ -0,0 +1,29 @@
+%h2.mbs
+ = t(:subscriptions)
+%h4{ :style => "line-height: 300%;" }
+ .last
+ = t(:lastestsubs)
+ - if @user.subscription_id
+ %ul
+ - @subscription.transactions.each do |transaction|
+ %li
+ %p{ :style => "font-size: 14px; font-weight: normal;" }
+ #{t(:date)} #{transaction.created_at}
+ %ul
+ = link_to "#{t(:unsubscribe_from)} #{@plan.name}", unsubscribe_subscription_path(@subscription.plan_id), method: :delete, class: "btn btn-danger"
+ %br
+ - else
+ %p{ :style => "font-size: 14px; font-weight: normal;"}
+ =t(:no_subs)
+ %h4
+ =t(:choose_subs)
+ %br
+ %ul.nav.nav-tabs.nav-stacked
+ - @subscriptions.each do |subscription|
+ .well
+ = subscription.name
+ = "$" + subscription.price.to_s
+ %div{ :style => "line-height: 300%;" }
+ = link_to t(:choose_button), subscription_path(subscription.id), class: "btn btn-info"
+
+
diff --git a/engines/billing/app/views/subscriptions/index2.html.haml b/engines/billing/app/views/subscriptions/index2.html.haml
deleted file mode 100644
index 1e3fb25..0000000
--- a/engines/billing/app/views/subscriptions/index2.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-%h2=t :all_subscriptions
-- pending_active_pastdue = false
-- @subscriptions.each do |s|
- - if ['Pending', 'Active','Past Due'].include? s.status
- - pending_active_pastdue = true
- = render :partial => "subscription_details", :locals => {:subscription => s}
-- if !pending_active_pastdue and @user == current_user
- = btn 'subscribe to plan', new_subscription_path
diff --git a/engines/billing/app/views/subscriptions/new12.html.haml b/engines/billing/app/views/subscriptions/new12.html.haml
deleted file mode 100644
index 8b302f2..0000000
--- a/engines/billing/app/views/subscriptions/new12.html.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-%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
diff --git a/engines/billing/app/views/subscriptions/show.html.erb b/engines/billing/app/views/subscriptions/show.html.erb
deleted file mode 100644
index 92cf863..0000000
--- a/engines/billing/app/views/subscriptions/show.html.erb
+++ /dev/null
@@ -1,22 +0,0 @@
-<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
-<h2 class="mbs">New Subscription
-</h2>
-<%= 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'%>
- <% end %>
- <br/>
- <p> Please enter payment details: </p>
- <div id="payment-form"></div>
- <div id="coinbase-container-id"></div>
- <div class="form-actions">
- <%= f.submit t(:subscribe), :class => 'btn btn-primary' %>
- </div>
- <script charset="utf-8" type="text/javascript">
- var clientToken = "<%= @client_token %>";
- braintree.setup(clientToken, "dropin", {
- container: "payment-form",
- coinbase: { container: "coinbase-container-id" }
- });
- </script>
-<% end %>
diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show.html.haml
new file mode 100644
index 0000000..45c54cc
--- /dev/null
+++ b/engines/billing/app/views/subscriptions/show.html.haml
@@ -0,0 +1,19 @@
+%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" }
+ });
diff --git a/engines/billing/app/views/subscriptions/show2.html.haml b/engines/billing/app/views/subscriptions/show2.html.haml
deleted file mode 100644
index 246ebf0..0000000
--- a/engines/billing/app/views/subscriptions/show2.html.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-%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'