mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Revert "Removing obsolete checkout views"
This reverts commit d0e013c1a5.
This commit is contained in:
4
app/views/spree/checkout/_distributor.html.haml
Normal file
4
app/views/spree/checkout/_distributor.html.haml
Normal file
@@ -0,0 +1,4 @@
|
||||
.columns.omega.six
|
||||
%fieldset#shipping
|
||||
%legend Distributor
|
||||
= render 'enterprises/distributor_details', :distributor => @order.distributor
|
||||
@@ -0,0 +1,13 @@
|
||||
<% if @order.state == 'address' %>
|
||||
<div class="columns omega four alternative-available-distributors">
|
||||
<% unless alternative_available_distributors(@order).empty? %>
|
||||
<%= form_for(@order) do |f| %>
|
||||
<%= f.label :distributor_label, "Alternative distributors for this order:" %>
|
||||
<%= f.select :distributor_id, options_for_select( enterprises_options(alternative_available_distributors(@order)) ) %>
|
||||
<%= f.submit "Change Distributor" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
No alternative distributors available.
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
36
app/views/spree/checkout/_summary.html.erb
Normal file
36
app/views/spree/checkout/_summary.html.erb
Normal file
@@ -0,0 +1,36 @@
|
||||
<!-- Copied from spree. Modifications marked below. -->
|
||||
<h3><%= t(:order_summary) %></h3>
|
||||
|
||||
<table data-hook="order_summary">
|
||||
<tbody>
|
||||
<tr data-hook="item_total">
|
||||
<td><strong><%= t(:item_total) %>:</strong></td>
|
||||
<td><strong><%= order.display_item_total %></strong></td>
|
||||
</tr>
|
||||
<tbody id="summary-order-charges" data-hook>
|
||||
<!-- Begin modifications -->
|
||||
<% adjustments = checkout_adjustments_for_summary(order) %>
|
||||
<% adjustments.each do |adjustment| %>
|
||||
<tr>
|
||||
<td><%= adjustment.label %>: </td>
|
||||
<td><%= adjustment.display_amount.to_html %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- End modifications -->
|
||||
</tbody>
|
||||
<tr data-hook="order_total">
|
||||
<td><strong><%= t(:order_total) %>:</strong></td>
|
||||
<td><strong><span id='summary-order-total'><%= @order.display_total.to_html %></span></strong></td>
|
||||
</tr>
|
||||
<% if order.price_adjustment_totals.present? %>
|
||||
<tbody id="price-adjustments" data-hook="order_details_price_adjustments">
|
||||
<% @order.price_adjustment_totals.each do |label, total| %>
|
||||
<tr class="total">
|
||||
<td><strong><%= label %></strong></td>
|
||||
<td><strong><span><%= total %></span></strong></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
25
app/views/spree/checkout/payment/_gateway.html.haml
Normal file
25
app/views/spree/checkout/payment/_gateway.html.haml
Normal file
@@ -0,0 +1,25 @@
|
||||
.row
|
||||
.small-6.columns
|
||||
%label
|
||||
First Name
|
||||
%input{type: :text, disabled: true, "ng-value" => "order.bill_address.firstname"}
|
||||
|
||||
.small-6.columns
|
||||
%label
|
||||
Last Name
|
||||
%input{type: :text, disabled: true, "ng-value" => "order.bill_address.lastname"}
|
||||
|
||||
.small-6.columns
|
||||
= validated_input "Card Number", "secrets.card_number", required: true, maxlength: 19, autocomplete: "off"
|
||||
.small-6.columns
|
||||
= validated_input "Security Code", "secrets.card_verification_value", required: true
|
||||
|
||||
.row
|
||||
.small-12.columns
|
||||
%label{for: "secrets.card_month"} Expiry Date
|
||||
|
||||
.row
|
||||
.small-6.columns
|
||||
%select{"ng-model" => "secrets.card_month", "ng-options" => "currMonth.value as currMonth.key for currMonth in months", name: "secrets.card_month", required: true}
|
||||
.small-6.columns
|
||||
%select{"ng-model" => "secrets.card_year", "ng-options" => "year for year in years", name: "secrets.card_year", required: true}
|
||||
0
app/views/spree/checkout/payment/_paypal.html.haml
Normal file
0
app/views/spree/checkout/payment/_paypal.html.haml
Normal file
Reference in New Issue
Block a user