summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/payments
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/payments
parentb26d10fe7d87b570bd888fa2a2543f3675278f8b (diff)
update to haml, created translations, deleted files
Diffstat (limited to 'engines/billing/app/views/payments')
-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
6 files changed, 6 insertions, 89 deletions
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}