Revert "Removing obsolete checkout views"

This reverts commit d0e013c1a5.
This commit is contained in:
Rob Harrington
2014-12-11 16:09:17 +11:00
parent dfb9e5bde5
commit b7810df346
5 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
.columns.omega.six
%fieldset#shipping
%legend Distributor
= render 'enterprises/distributor_details', :distributor => @order.distributor

View File

@@ -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 %>

View 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>

View 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}