Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap 4 fixes #206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions app/views/spree/admin/payments/_paypal_complete.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
<%= form_tag paypal_refund_admin_order_payment_path(@order, @payment) do %>
<div class="label-block left five columns alpha">
<div class="label-block col-5">
<div>
<fieldset data-hook="admin_variant_new_form">
<legend><%= Spree.t('refund', :scope => :paypal) %></legend>
<legend>
<%= Spree.t('refund', :scope => :paypal) %>
</legend>

<div class='field'>
<%= label_tag 'refund_amount', Spree.t(:refund_amount, :scope => 'paypal') %>
<small><em><%= Spree.t(:original_amount, :scope => 'paypal', :amount => @payment.display_amount) %></em></small><br>
<small>
<em>
<%= Spree.t(:original_amount, :scope => 'paypal', :amount => @payment.display_amount) %>
</em>
</small>
<br />

<% symbol = ::Money.new(1, Spree::Config[:currency]).symbol %>

<% if Spree::Config[:currency_symbol_position] == "before" %>
<%= symbol %><%= text_field_tag 'refund_amount', @payment.amount %>
<% else %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/admin/payments/paypal_refund.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<% end %>

<%= form_tag paypal_refund_admin_order_payment_path(@order, @payment) do %>
<div class="label-block left five columns alpha">
<div class="label-block col-5">
<div>
<fieldset data-hook="admin_variant_new_form">
<legend><%= Spree.t('refund', :scope => :paypal) %></legend>
Expand Down
8 changes: 5 additions & 3 deletions app/views/spree/admin/payments/source_views/_paypal.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<fieldset data-hook="paypal">
<legend align="center"><%= Spree.t(:transaction, :scope => :paypal) %></legend>
<legend align="center">
<%= Spree.t(:transaction, :scope => :paypal) %>
</legend>

<div class="row">
<div class="alpha six columns">
<div class="col-6">
<dl>
<dt><%= Spree.t(:payer_id, :scope => :paypal) %>:</dt>
<dd><%= payment.source.payer_id %></dd>
Expand All @@ -18,7 +20,7 @@
<% if payment.source.state != 'refunded' %>
<%= button_link_to Spree.t('actions.refund', scope: :paypal), spree.paypal_refund_admin_order_payment_path(@order, payment), icon: 'money' %>
<% else %>
<div class="alpha six columns">
<div class="col-6">
<dl>
<dt><%= Spree.t(:state, :scope => :paypal) %>:</dt>
<dd><%= payment.source.state.titleize %></dd>
Expand Down
11 changes: 8 additions & 3 deletions app/views/spree/checkout/payment/_paypal.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

<%= link_to(image_tag("https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"), paypal_express_url(:payment_method_id => payment_method.id), :method => :post, :id => "paypal_button") %>

<div class="mt-3">
<%= link_to(
image_tag("https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"),
paypal_express_url(:payment_method_id => payment_method.id),
:method => :post,
:id => "paypal_button"
) %>
</div>
<script>
SpreePaypalExpress.paymentMethodID = "<%= payment_method.id %>"
</script>