app/views/spree/checkout/_payment.html.erb in solidus_frontend-2.1.1 vs app/views/spree/checkout/_payment.html.erb in solidus_frontend-2.2.0.beta1
- old
+ new
@@ -1,9 +1,9 @@
<fieldset id="payment" data-hook>
<legend align="center"><%= Spree.t(:payment_information) %></legend>
<div data-hook="checkout_payment_step">
- <% if @payment_sources.present? %>
+ <% if @wallet_payment_sources.present? %>
<div class="card_options">
<%= radio_button_tag 'use_existing_card', 'yes', true %>
<label for="use_existing_card_yes">
<%= Spree.t(:use_existing_cc) %>
</label>
@@ -16,20 +16,20 @@
<div id="existing_cards">
<p class="field" data-hook="existing_cards">
<table class="existing-credit-card-list">
<tbody>
- <% @payment_sources.each do |card| %>
- <tr id="<%= dom_id(card,'spree')%>" class="<%= cycle('even', 'odd') %>">
- <td><%= card.name %></td>
- <td><%= card.display_number %></td>
- <td><%= card.month %></td>
- <td><%= card.year %></td>
- <td>
- <%= radio_button_tag "order[existing_card]", card.id, (card == @payment_sources.first), { class: "existing-cc-radio" } %>
- </td>
- </tr>
+ <% @wallet_payment_sources.each do |wallet_payment_source| %>
+ <%=
+ render(
+ partial: "spree/checkout/existing_payment/#{wallet_payment_source.payment_source.payment_method.method_type}",
+ locals: {
+ wallet_payment_source: wallet_payment_source,
+ default: wallet_payment_source == @default_wallet_payment_source,
+ }
+ )
+ %>
<% end %>
</tbody>
</table>
</p>
</div>
@@ -38,21 +38,21 @@
<div id="payment-method-fields" data-hook>
<% @order.available_payment_methods.each do |method| %>
<p>
<label>
<%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %>
- <%= Spree.t(method.name, :scope => :payment_methods, :default => method.name) %>
+ <%= Spree.t(method.name, scope: :payment_methods, default: method.name) %>
</label>
</p>
<% end %>
</div>
<ul id="payment-methods" data-hook>
<% @order.available_payment_methods.each do |method| %>
<li id="payment_method_<%= method.id %>" class="<%= 'last' if method == @order.available_payment_methods.last %>" data-hook>
<fieldset>
- <%= render :partial => "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method } %>
+ <%= render partial: "spree/checkout/payment/#{method.method_type}", locals: { payment_method: method } %>
</fieldset>
</li>
<% end %>
</ul>
<br style="clear:both;" />
@@ -70,8 +70,8 @@
</fieldset>
<br class="space" />
<div class="form-buttons" data-hook="buttons">
- <%= submit_tag Spree.t(:save_and_continue), :class => 'continue button primary' %>
+ <%= submit_tag Spree.t(:save_and_continue), class: 'continue button primary' %>
<script>Spree.disableSaveOnClick();</script>
</div>